Procházet zdrojové kódy

Fixes #1558, `this.get` is not a function

JC Brand před 6 roky
rodič
revize
7a990ae0b9
2 změnil soubory, kde provedl 4 přidání a 3 odebrání
  1. 1 0
      CHANGES.md
  2. 3 3
      src/headless/converse-core.js

+ 1 - 0
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).

+ 3 - 3
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())
             );