Skip to content

Commit

Permalink
Do not notify of my own chat state
Browse files Browse the repository at this point in the history
  • Loading branch information
singpolyma committed Nov 13, 2024
1 parent ba57f62 commit 2751744
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions snikket/Client.hx
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,11 @@ class Client extends EventEmitter {
default: null;
};
if (userState != null) {
for (handler in chatStateHandlers) {
handler(message.senderId, message.chatId, message.threadId, userState);
final chat = getChat(from.asBare().asString());
if (chat == null || !chat.getParticipantDetails(message.senderId).isSelf) {
for (handler in chatStateHandlers) {
handler(message.senderId, message.chatId, message.threadId, userState);
}
}
}
}
Expand Down

0 comments on commit 2751744

Please sign in to comment.