Commit 3f751b3a authored by JC Brand's avatar JC Brand

Add guard for non-existing `chat_state` value

parent c494f426
......@@ -405,7 +405,7 @@ converse.plugins.add('converse-chatboxes', {
* as taken from the 'chat_state' attribute of the chat box.
* See XEP-0085 Chat State Notifications.
*/
if (_converse.send_chat_state_notifications) {
if (_converse.send_chat_state_notifications && this.get('chat_state')) {
_converse.api.send(
$msg({'to':this.get('jid'), 'type': 'chat'})
.c(this.get('chat_state'), {'xmlns': Strophe.NS.CHATSTATES}).up()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment