Hi Schimon,
yes, in Monal I'm using dico info requests to detect if a jid is a MUC or 1:1 chat:
https://github.com/monal-im/Monal/blob/develop/Monal/Classes/xmpp.m#L4551[1]
You'll have to properly check for different errors, see the comments in the code.
-tmolitor
Am Sonntag, 10. August 2025, 08:45:44 CEST schrieb Schimon Jehudah:
Good day.
I have a question concerning to preferable practice in JID recognition.
Preface
-------
I am working on an XMPP service (i.e. "bot") for both private and group
chat. I utilize Slixmpp for that task.
Slixmpp
-------
Slixmpp has a "reply" function which automatically classifies the task,
due to information which is attached to IQ Stanza.
Concern
-------
However, when the service actively sends schedule messages, it needs to
classify the given JID to which it sends a message.
Database
--------
I have recently decided to classify subscribers of the service inside a
database, which also has fields of Private, MIX, and MUC.
Disco
-----
I was wondering whether should query JID addresses using "disco" (i.e.
XEP-0030: Service Discovery), or should I utilize the database?
Utilizing "disco" is prone to errors (e.g. when server blocks another
server - displaying "recepient-unavailable" - yet contacts can still
communicate).
Conclusion
----------
Please advise.
Kind regards,
Schimon
_______________________________________________
Standards mailing list -- standards(a)xmpp.org
To unsubscribe send an email to standards-leave(a)xmpp.org
--------
[1]
https://github.com/monal-im/Monal/blob/develop/Monal/Classes/xmpp.m#L4551