Add guard for non-existing chat_state
value
This commit is contained in:
parent
c494f4267a
commit
3f751b3af4
@ -405,7 +405,7 @@ converse.plugins.add('converse-chatboxes', {
|
|||||||
* as taken from the 'chat_state' attribute of the chat box.
|
* as taken from the 'chat_state' attribute of the chat box.
|
||||||
* See XEP-0085 Chat State Notifications.
|
* 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(
|
_converse.api.send(
|
||||||
$msg({'to':this.get('jid'), 'type': 'chat'})
|
$msg({'to':this.get('jid'), 'type': 'chat'})
|
||||||
.c(this.get('chat_state'), {'xmlns': Strophe.NS.CHATSTATES}).up()
|
.c(this.get('chat_state'), {'xmlns': Strophe.NS.CHATSTATES}).up()
|
||||||
|
Loading…
Reference in New Issue
Block a user