Page MenuHomePhabricator

D13292.diff
No OneTemporary

D13292.diff

diff --git a/lib/shared/dm-ops/dm-op-utils.js b/lib/shared/dm-ops/dm-op-utils.js
--- a/lib/shared/dm-ops/dm-op-utils.js
+++ b/lib/shared/dm-ops/dm-op-utils.js
@@ -76,7 +76,8 @@
+recipients:
| { +type: 'all_peer_devices' | 'self_devices' }
| { +type: 'some_users', +userIDs: $ReadOnlyArray<string> }
- | { +type: 'all_thread_members', +threadID: string },
+ | { +type: 'all_thread_members', +threadID: string }
+ | { +type: 'some_devices', +deviceIDs: $ReadOnlyArray<string> },
+sendOnly?: boolean,
};
@@ -123,6 +124,11 @@
peerUserIDAndDeviceIDs = allPeerUserIDAndDeviceIDs.filter(peer =>
userIDs.has(peer.userID),
);
+ } else if (operation.recipients.type === 'some_devices') {
+ const deviceIDs = new Set(operation.recipients.deviceIDs);
+ peerUserIDAndDeviceIDs = allPeerUserIDAndDeviceIDs.filter(peer =>
+ deviceIDs.has(peer.deviceID),
+ );
}
const thisDeviceID = await getContentSigningKey();

File Metadata

Mime Type
text/plain
Expires
Thu, Jan 9, 7:19 PM (1 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2838375
Default Alt Text
D13292.diff (966 B)

Event Timeline