mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-05 06:28:51 +00:00
Add unread count from actual participant
This commit is contained in:
1 file changed
+5
-1
@@ -243,10 +243,14 @@ async function getConsolidatedMessageGroups(userIdentifier: string): Promise<Mes
|
|||||||
mapping[groupId].phoneNumbers = mapping[groupId].phoneNumbers.concat(
|
mapping[groupId].phoneNumbers = mapping[groupId].phoneNumbers.concat(
|
||||||
messageGroup.phone_number,
|
messageGroup.phone_number,
|
||||||
);
|
);
|
||||||
|
if (messageGroup.participant_identifier === userIdentifier) {
|
||||||
|
mapping[groupId].unreadCount = messageGroup.unreadCount;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
mapping[groupId] = {
|
mapping[groupId] = {
|
||||||
user_identifier: messageGroup.user_identifier,
|
user_identifier: messageGroup.user_identifier,
|
||||||
unreadCount: messageGroup.unreadCount,
|
unreadCount:
|
||||||
|
messageGroup.participant_identifier === userIdentifier ? messageGroup.unreadCount : 0,
|
||||||
avatar: messageGroup.avatar,
|
avatar: messageGroup.avatar,
|
||||||
label: messageGroup.label,
|
label: messageGroup.label,
|
||||||
participants: [displayTerm],
|
participants: [displayTerm],
|
||||||
|
|||||||
Reference in new issue
Block a user