Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3383059
D12381.id41169.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D12381.id41169.diff
View Options
diff --git a/lib/tunnelbroker/use-peer-to-peer-message-handler.js b/lib/tunnelbroker/use-peer-to-peer-message-handler.js
--- a/lib/tunnelbroker/use-peer-to-peer-message-handler.js
+++ b/lib/tunnelbroker/use-peer-to-peer-message-handler.js
@@ -8,7 +8,10 @@
useBroadcastDeviceListUpdates,
useGetAndUpdateDeviceListsForUsers,
} from '../hooks/peer-list-hooks.js';
-import { getForeignPeerDevices } from '../selectors/user-selectors.js';
+import {
+ getAllPeerDevices,
+ getForeignPeerDevices,
+} from '../selectors/user-selectors.js';
import {
verifyAndGetDeviceList,
removeDeviceFromDeviceList,
@@ -40,6 +43,7 @@
const foreignPeerDevices = useSelector(getForeignPeerDevices);
const broadcastDeviceListUpdates = useBroadcastDeviceListUpdates();
const getAndUpdateDeviceListsForUsers = useGetAndUpdateDeviceListsForUsers();
+ const allPeerDevices = useSelector(getAllPeerDevices);
return React.useCallback(
async (message: PeerToPeerMessage, messageID: string) => {
@@ -143,7 +147,9 @@
userID,
deviceIDToLogOut,
);
- // TODO: broadcast device list update here
+ await broadcastDeviceListUpdates(
+ allPeerDevices.filter(deviceID => deviceID !== deviceIDToLogOut),
+ );
} catch (e) {
console.log(e);
}
@@ -257,6 +263,7 @@
identityClient,
olmAPI,
sqliteAPI,
+ allPeerDevices,
],
);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 29, 1:17 PM (21 h, 15 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2596209
Default Alt Text
D12381.id41169.diff (1 KB)
Attached To
Mode
D12381: [lib] broadcast device list updates after secondary device logout
Attached
Detach File
Event Timeline
Log In to Comment