| author | Stephen Paul Weber
<singpolyma@singpolyma.net> 2024-11-13 16:34:00 UTC |
| committer | Stephen Paul Weber
<singpolyma@singpolyma.net> 2024-11-13 16:34:00 UTC |
| parent | ba57f62fbf7616ecf60045afb7b4ce13b0930eb9 |
| snikket/Client.hx | +5 | -2 |
diff --git a/snikket/Client.hx b/snikket/Client.hx index 766a88e..28870b3 100644 --- a/snikket/Client.hx +++ b/snikket/Client.hx @@ -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); + } } } }