Commit 16b8946d authored by JC Brand's avatar JC Brand

Updates #978: Use moment and generate date in correct format

parent ee751ec5
...@@ -710,8 +710,11 @@ ...@@ -710,8 +710,11 @@
// Forward the message, so that other connected resources are also aware of it. // Forward the message, so that other connected resources are also aware of it.
_converse.connection.send( _converse.connection.send(
$msg({ to: _converse.bare_jid, type: 'chat', id: message.get('msgid') }) $msg({ to: _converse.bare_jid, type: 'chat', id: message.get('msgid') })
.c('forwarded', {xmlns:'urn:xmpp:forward:0'}) .c('forwarded', {'xmlns': Strophe.NS.FORWARD})
.c('delay', {xmns:'urn:xmpp:delay',stamp:(new Date()).getTime()}).up() .c('delay', {
'xmns': Strophe.NS.DELAY,
'stamp': moment.format()
}).up()
.cnode(messageStanza.tree()) .cnode(messageStanza.tree())
); );
} }
......
...@@ -36,13 +36,14 @@ ...@@ -36,13 +36,14 @@
Strophe.addNamespace('CHATSTATES', 'http://jabber.org/protocol/chatstates'); Strophe.addNamespace('CHATSTATES', 'http://jabber.org/protocol/chatstates');
Strophe.addNamespace('CSI', 'urn:xmpp:csi:0'); Strophe.addNamespace('CSI', 'urn:xmpp:csi:0');
Strophe.addNamespace('DELAY', 'urn:xmpp:delay'); Strophe.addNamespace('DELAY', 'urn:xmpp:delay');
Strophe.addNamespace('FORWARD', 'urn:xmpp:forward:0');
Strophe.addNamespace('HINTS', 'urn:xmpp:hints'); Strophe.addNamespace('HINTS', 'urn:xmpp:hints');
Strophe.addNamespace('MAM', 'urn:xmpp:mam:2'); Strophe.addNamespace('MAM', 'urn:xmpp:mam:2');
Strophe.addNamespace('SID', 'urn:xmpp:sid:0');
Strophe.addNamespace('NICK', 'http://jabber.org/protocol/nick'); Strophe.addNamespace('NICK', 'http://jabber.org/protocol/nick');
Strophe.addNamespace('PUBSUB', 'http://jabber.org/protocol/pubsub'); Strophe.addNamespace('PUBSUB', 'http://jabber.org/protocol/pubsub');
Strophe.addNamespace('ROSTERX', 'http://jabber.org/protocol/rosterx'); Strophe.addNamespace('ROSTERX', 'http://jabber.org/protocol/rosterx');
Strophe.addNamespace('RSM', 'http://jabber.org/protocol/rsm'); Strophe.addNamespace('RSM', 'http://jabber.org/protocol/rsm');
Strophe.addNamespace('SID', 'urn:xmpp:sid:0');
Strophe.addNamespace('XFORM', 'jabber:x:data'); Strophe.addNamespace('XFORM', 'jabber:x:data');
// Use Mustache style syntax for variable interpolation // Use Mustache style syntax for variable interpolation
......
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