@@ -313,6 +313,7 @@ function ChatProxy(service, webrtcModule, conn) {
313313 extraParams = chatUtils . getElement ( stanza , 'extraParams' ) ,
314314 delay = chatUtils . getElement ( stanza , 'delay' ) ,
315315 moduleIdentifier = chatUtils . getElementText ( extraParams , 'moduleIdentifier' ) ,
316+ bodyContent = chatUtils . getElementText ( stanza , 'body' ) ,
316317 message ;
317318
318319 if ( moduleIdentifier === 'SystemNotifications' && typeof self . onSystemMessageListener === 'function' ) {
@@ -321,6 +322,7 @@ function ChatProxy(service, webrtcModule, conn) {
321322 message = {
322323 id : messageId ,
323324 userId : self . helpers . getIdFromNode ( from ) ,
325+ body : bodyContent ,
324326 extension : extraParamsParsed . extension
325327 } ;
326328
@@ -608,6 +610,8 @@ ChatProxy.prototype = {
608610
609611 nClient . send ( stanza ) ;
610612 }
613+
614+ return paramsCreateMsg . id ;
611615 } ,
612616 sendSystemMessage : function ( jid_or_user_id , message ) {
613617 var self = this ,
@@ -620,14 +624,20 @@ ChatProxy.prototype = {
620624
621625 var stanza = chatUtils . createStanza ( builder , paramsCreateMsg ) ;
622626
627+ if ( message . body ) {
628+ stanza . c ( 'body' , {
629+ xmlns : chatUtils . MARKERS . CLIENT ,
630+ } ) . t ( message . body ) . up ( ) ;
631+ }
632+
623633 if ( Utils . getEnv ( ) . browser ) {
624634 // custom parameters
625635 if ( message . extension ) {
626636 stanza . c ( 'extraParams' , {
627637 xmlns : chatUtils . MARKERS . CLIENT
628638 } ) . c ( 'moduleIdentifier' ) . t ( 'SystemNotifications' ) . up ( ) ;
629639
630- stanza = chatUtils . filledExtraParams ( stanza , message . extension ) ;
640+ stanza = chatUtils . filledExtraParams ( stanza , message . extension ) ;
631641 }
632642
633643 connection . send ( stanza ) ;
@@ -644,6 +654,8 @@ ChatProxy.prototype = {
644654
645655 nClient . send ( stanza ) ;
646656 }
657+
658+ return paramsCreateMsg . id ;
647659 } ,
648660 sendIsTypingStatus : function ( jid_or_user_id ) {
649661 var self = this ,
0 commit comments