Page MenuHomePhabricator

D13233.diff
No OneTemporary

D13233.diff

diff --git a/lib/shared/dm-ops/remove-members-spec.js b/lib/shared/dm-ops/remove-members-spec.js
--- a/lib/shared/dm-ops/remove-members-spec.js
+++ b/lib/shared/dm-ops/remove-members-spec.js
@@ -50,7 +50,28 @@
rawMessageInfoFromMessageData(messageData, messageID),
];
- const removedUserIDsSet = new Set(removedUserIDs);
+ const memberTimestamps = { ...threadInfo.timestamps.members };
+ const removedUserIDsSet = new Set<string>();
+ for (const userID of removedUserIDs) {
+ if (!memberTimestamps[userID]) {
+ memberTimestamps[userID] = {
+ isMember: time,
+ subscription: threadInfo.creationTime,
+ };
+ }
+
+ if (memberTimestamps[userID].isMember > time) {
+ continue;
+ }
+
+ memberTimestamps[userID] = {
+ ...memberTimestamps[userID],
+ isMember: time,
+ };
+
+ removedUserIDsSet.add(userID);
+ }
+
const viewerIsRemoved = removedUserIDsSet.has(viewerID);
const updateInfos: Array<ClientUpdateInfo> = [];
if (
@@ -71,6 +92,10 @@
members: threadInfo.members.filter(
member => !removedUserIDsSet.has(member.id),
),
+ timestamps: {
+ ...threadInfo.timestamps,
+ members: memberTimestamps,
+ },
};
updateInfos.push({
type: updateTypes.UPDATE_THREAD,

File Metadata

Mime Type
text/plain
Expires
Mon, Nov 25, 6:35 PM (21 h, 40 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2580682
Default Alt Text
D13233.diff (1 KB)

Event Timeline