mirror of
https://github.com/stoatchat/javascript-client-sdk.git
synced 2026-07-20 20:16:06 -04:00
fix: remove reaction object completely
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "revolt.js",
|
||||
"version": "6.0.11",
|
||||
"version": "6.0.12",
|
||||
"main": "dist/index.js",
|
||||
"typings": "dist/index.d.ts",
|
||||
"module": "esm/index.js",
|
||||
|
||||
+11
-3
@@ -334,9 +334,17 @@ export class WebSocketClient {
|
||||
|
||||
case "MessageUnreact": {
|
||||
const msg = this.client.messages.get(packet.id);
|
||||
msg?.reactions
|
||||
.get(packet.emoji_id)
|
||||
?.delete(packet.user_id);
|
||||
const user_ids = msg?.reactions.get(
|
||||
packet.emoji_id,
|
||||
);
|
||||
|
||||
if (user_ids) {
|
||||
user_ids.delete(packet.user_id);
|
||||
if (user_ids.size === 0) {
|
||||
msg!.reactions.delete(packet.emoji_id);
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user