From 7a990ae0b997c5adb701e39024505b2040ed0b8c Mon Sep 17 00:00:00 2001 From: JC Brand Date: Mon, 13 May 2019 14:35:55 +0200 Subject: [PATCH] Fixes #1558, `this.get` is not a function --- CHANGES.md | 1 + src/headless/converse-core.js | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index aaa6ee785..aa2f20530 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -17,6 +17,7 @@ - #1532: Converse reloads on enter pressed in the filter box - #1550: Legitimate carbons being blocked due to erroneous forgery check - #1554: Room auto-configuration broke if the config form contained fields with type `fixed` +- #1558: `this.get` is not a function error when `forward_messages` is set to `true`. - **Breaking changes**: - Rename `muc_disable_moderator_commands` to [muc_disable_slash_commands](https://conversejs.org/docs/html/configuration.html#muc-disable-slash-commands). diff --git a/src/headless/converse-core.js b/src/headless/converse-core.js index f48b498b4..b8337e17b 100644 --- a/src/headless/converse-core.js +++ b/src/headless/converse-core.js @@ -1792,11 +1792,11 @@ _converse.api = { _converse.connection.send( $msg({ 'to': _converse.bare_jid, - 'type': this.get('message_type'), + 'type': stanza.getAttribute('type'), }).c('forwarded', {'xmlns': Strophe.NS.FORWARD}) .c('delay', { - 'xmns': Strophe.NS.DELAY, - 'stamp': (new Date()).toISOString() + 'xmns': Strophe.NS.DELAY, + 'stamp': (new Date()).toISOString() }).up() .cnode(stanza.tree()) );