Page MenuHomePhabricator

D13766.id45314.diff
No OneTemporary

D13766.id45314.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
@@ -459,16 +459,15 @@
const time = Math.max(messagesFromOtherPeers.map(message => message.time));
invariant(threadInfo.thick, 'Thread should be thick');
- // We aren't checking if the unread timestamp is lower than the time.
- // We're doing this because we want to flip the thread to unread after
- // any new message from a non-viewer.
- newUpdateInfos.push({
- type: updateTypes.UPDATE_THREAD_READ_STATUS,
- id: uuid.v4(),
- time,
- threadID: threadInfo.id,
- unread: true,
- });
+ if (threadInfo.timestamps.currentUser.unread < time) {
+ newUpdateInfos.push({
+ type: updateTypes.UPDATE_THREAD_READ_STATUS,
+ id: uuid.v4(),
+ time,
+ threadID: threadInfo.id,
+ unread: true,
+ });
+ }
}
return newUpdateInfos;

File Metadata

Mime Type
text/plain
Expires
Tue, Nov 26, 6:17 AM (10 h, 39 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2583222
Default Alt Text
D13766.id45314.diff (985 B)

Event Timeline