0 Replies Latest reply on Jul 17, 2017 6:15 AM by vijaya

    Need help retrieving chat message using mam and rsm

    vijaya

      I am doing retrieving all conversions between two jid users. I have enables monitoring services also but i am getting service

       

      Here is query sending

       

      Code:

       

      AxionIM.connection.mam.query("myemailid@gmail.com", {

        "with": "toemailid@gmail.com",

        onMessage: function(message) {

      console.log(message);

        },

        onComplete: function(response) {

      console.log("Got all the messages");

        }

      });

      },

       

       

       

      Sending Query

      <body rid='3673830362' xmlns='http://jabber.org/protocol/httpbind' sid='6cnxfa5tmj'><iq type='get' to='myemailid@gmail.com' xmlns='jabber:client' id='10:sendIQ'><query xmlns='urn:xmpp:mam:tmp'><with>toemailid@gmail.com</with><set xmlns='http://jabber.org/protocol/rsm'/></query></iq></body>

       

       

      Receiving Result:

      <body xmlns='http://jabber.org/protocol/httpbind' ack='3673830362'><iq xmlns='jabber:client' type='error' id='10:sendIQ' from='myemailid@gmail.com' to='myemailid@gmail.com/6cnxfa5tmj'><query xmlns='urn:xmpp:mam:tmp'><with>toemailid@gmail.com</with><set xmlns='http://jabber.org/protocol/rsm'/></query><error code='503' type='cancel'><service-unavailable xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/></error></iq></body>