Supported Server

Part of the product I am working on contains an XMPP server and client. One of the engineers from the client group came to me with a question that I am not sure how to answer so I am hoping someone here can. Hopefully this is something simple. What he has to do with the client is check what type of server he is connecting to. So when my company's client is connecting an XMPP server and the authentication (or any other message during this process) message comes back, he wants to look in the message for some sort of tag to indicate if the server is a server that is developed by my company or is another XMPP server. Our client will be able to connect to any ejabberd/XMPP server but it was decided that the client should display a message if the user is not connecting to the server that we are devoloping/supporting.

Is there currently a way to do this or would someone have a suggestion as to how I can make this change?

For example: <iq

For example:

<iq id='173:368799' type='get' to='localhost'>
  <query xmlns='http://jabber.org/protocol/disco#info'/>
</iq>

<iq to='user1@localhost/tka1' from='localhost' type='result' id='173:368799'>
  <query xmlns='http://jabber.org/protocol/disco#info'>
    <identity type='pep' category='pubsub'/>
    <identity name='ejabberd' type='im' category='server'/>
    ...

Another possibility:

<iq id='175:596161' type='get' to='localhost'>
  <query xmlns='jabber:iq:version'/>
</iq>

<iq to='user1@localhost/tka1' from='localhost' type='result' id='175:596161'>
  <query xmlns='jabber:iq:version'>
    <name>ejabberd</name>
    <os>unix/linux 4.4.0</os>
    <version>17.03.32</version>
  </query>
</iq>

Not exactly sure where I

Not exactly sure where I would inject my company's name and possibly software version in either of those message. I am assuming those messages are somewhere in the ejabberd code?

Yes, the first in

Yes, the first in mod_disco.erl function get_local_identity. The second in mod_vcard.erl function process_local_iq

Syndicate content