Skip to content

Commit

Permalink
Fix lastMessage in BuddyList
Browse files Browse the repository at this point in the history
  • Loading branch information
rottabonus committed Dec 2, 2023
1 parent 30575bd commit daf2869
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/state/reducers/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ export const getLastMessageByBuddyId =
O.chain(r => record.lookup(buddyId, r)),
O.map(r => Object.values(r)),
O.fold(() => [], identity),
array.sort(ordMessage),
);

return messages[messages.length - 1]?.content ?? '';
Expand Down

0 comments on commit daf2869

Please sign in to comment.