Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3382885
D12377.id41288.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
812 B
Referenced Files
None
Subscribers
None
D12377.id41288.diff
View Options
diff --git a/services/identity/src/tunnelbroker.rs b/services/identity/src/tunnelbroker.rs
--- a/services/identity/src/tunnelbroker.rs
+++ b/services/identity/src/tunnelbroker.rs
@@ -50,3 +50,25 @@
.await?,
)
}
+
+pub async fn send_device_list_update(device_ids: &[&str]) -> Result<(), Error> {
+ let mut tunnelbroker_client = create_tunnelbroker_client().await?;
+
+ let update = messages::IdentityDeviceListUpdated {};
+ let payload = serde_json::to_string(&update).unwrap();
+
+ for &device_id in device_ids {
+ let request = MessageToDevice {
+ device_id: device_id.to_string(),
+ payload: payload.clone(),
+ };
+
+ let grpc_message = tonic::Request::new(request);
+
+ tunnelbroker_client
+ .send_message_to_device(grpc_message)
+ .await?;
+ }
+
+ Ok(())
+}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 29, 12:31 PM (21 h, 50 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2596659
Default Alt Text
D12377.id41288.diff (812 B)
Attached To
Mode
D12377: [Identity] implement sending `IdentityDeviceListUpdated` using Tunnelbroker client
Attached
Detach File
Event Timeline
Log In to Comment