3

I am using mod muc_light in MongooseIM from source code(ver-3.1.0) and taking help from this article I am able to perform the below operations successfully without any trouble:

  1. create a new muc light room.
  2. send/receive text message stanza
  3. queries MAM and receives regular groupchat message. ['6.2.1 Groupchat message from occupant' from above article][Even, here I am getting the muc info but since this is related to a particular muc light room. So, not much useful.]

But I am unable to query MAM and receives an affiliation change notification. See topic [6.2.2 Affiliation change] in the above article link.

Following is the request/response for 'affiliation change notification'

// Request to server with type='set'
<iq type='set' 
    id='mamget2' 
    to='muclight.localhost'> 
    <query xmlns='urn:xmpp:mam:1' queryid='f37'/> 
</iq>

// Response from server
<iq xmlns='jabber:client' 
    from='muclight.localhost' 
    to='ip0a0g0ur63vdjns@localhost/E42B7412598F3B081543-557985-559692' 
    id='mamget2' 
    type='error'>
    <error code='' type='cancel'>
      <not-allowed xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
      <text xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'>The action is not allowed.</text>
    </error>
</iq>

// Request to server with type='get'
<iq type='get' 
    id='mamget2' 
    to='muclight.localhost'> 
    <query xmlns='urn:xmpp:mam:1' queryid='f37'/> 
</iq>

// Response from server
<iq xmlns='jabber:client' 
    from='muclight.localhost' 
    to='ip0a0g0ur63vdjns@localhost/E42B7412598F3B081543-557985-559692' 
    id='mamget2' 
    type='error'>
    <error code='' type='cancel'>
      <not-allowed xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
      <text xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'>The action is not allowed.</text>
    </error>
</iq>

MongooseIM config:

  {mod_muc_light, [
      {host, "muclight.@HOST@"},
      {backend, rdbms},
      {max_occupants, 256}
     ]},
  {mod_mam_meta, [
     {backend, rdbms},
     {no_stanzaid_element, true},
     {is_archivable_message, "muclight.@HOST@"},
     {pm, false},
     {muc, [
       {host, "muclight.@HOST@"}
     ]}
   ]}

Questions/concerns:

  1. Am I doing something wrong in config? - [I doubt this, because some others operation are working fine like mentioned above]
  2. Am I sending the incorrect IQ stanza - [I doubt this because I am copying the exact same stanza example provided in above link]
  3. Should I update MongooseIM. [May be]
  4. Anything else?

Please help

Shubham1164
  • 357
  • 6
  • 16

0 Answers0