mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 11:22:31 +00:00
fix(chat) make reactions processing more resilient
This commit is contained in:
committed by
Saúl Ibarra Corretgé
parent
939a9a45d3
commit
4b93cbbd8d
@@ -127,11 +127,14 @@ MiddlewareRegistry.register(store => next => action => {
|
||||
const { participant, data } = action;
|
||||
|
||||
if (data?.name === ENDPOINT_REACTION_NAME) {
|
||||
store.dispatch(pushReactions(data.reactions));
|
||||
// Skip duplicates, keep just 3.
|
||||
const reactions = Array.from(new Set(data.reactions)).slice(0, 3) as string[];
|
||||
|
||||
store.dispatch(pushReactions(reactions));
|
||||
|
||||
_handleReceivedMessage(store, {
|
||||
participantId: participant.getId(),
|
||||
message: getReactionMessageFromBuffer(data.reactions),
|
||||
message: getReactionMessageFromBuffer(reactions),
|
||||
privateMessage: false,
|
||||
lobbyChat: false,
|
||||
timestamp: data.timestamp
|
||||
|
||||
Reference in New Issue
Block a user