Page MenuHomePhabricator

D12377.diff
No OneTemporary

D12377.diff

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

Mime Type
text/plain
Expires
Fri, Nov 29, 10:28 AM (21 h, 54 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2596659
Default Alt Text
D12377.diff (812 B)

Event Timeline