|
|
@@ -127,11 +127,14 @@ MiddlewareRegistry.register(store => next => action => {
|
|
127
|
127
|
const { participant, data } = action;
|
|
128
|
128
|
|
|
129
|
129
|
if (data?.name === ENDPOINT_REACTION_NAME) {
|
|
130
|
|
- store.dispatch(pushReactions(data.reactions));
|
|
|
130
|
+ // Skip duplicates, keep just 3.
|
|
|
131
|
+ const reactions = Array.from(new Set(data.reactions)).slice(0, 3) as string[];
|
|
|
132
|
+
|
|
|
133
|
+ store.dispatch(pushReactions(reactions));
|
|
131
|
134
|
|
|
132
|
135
|
_handleReceivedMessage(store, {
|
|
133
|
136
|
participantId: participant.getId(),
|
|
134
|
|
- message: getReactionMessageFromBuffer(data.reactions),
|
|
|
137
|
+ message: getReactionMessageFromBuffer(reactions),
|
|
135
|
138
|
privateMessage: false,
|
|
136
|
139
|
lobbyChat: false,
|
|
137
|
140
|
timestamp: data.timestamp
|