recent_senders: Fix twice sent user ids in PM to self case.

This caused double user avatar to appear in recent conversations
for when showing user PM to self.
This commit is contained in:
Aman Agrawal
2023-02-22 04:45:38 +00:00
committed by Tim Abbott
parent a633890d87
commit e6f3ffb946
2 changed files with 21 additions and 2 deletions

View File

@@ -347,4 +347,14 @@ test("process_pms", () => {
participants: [],
non_participants: [],
});
rs.process_private_message({
to_user_ids: "1",
sender_id: sender1,
id: 4,
});
assert.deepEqual(rs.get_pm_recent_senders("1"), {
participants: [1],
non_participants: [],
});
});