Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

there is no roominfo_avatarhash in muc disco info #4234

Open
Ri0n opened this issue Jun 13, 2024 · 2 comments
Open

there is no roominfo_avatarhash in muc disco info #4234

Ri0n opened this issue Jun 13, 2024 · 2 comments

Comments

@Ri0n
Copy link

Ri0n commented Jun 13, 2024

Before creating a ticket, please consider if this should fit the discussion forum better.

Environment

  • ejabberd version: 24.02
  • Erlang version: 14.2.1
  • OS: Gentoo Linux
  • Installed from: distro package

Errors from error.log/crash.log

No errors

Bug description

It's about XEP-0486 implementation.
after setting vcard-temp for muc it sends back two stanzas

<presence from="[email protected]" id="16055317580281355378" to="rion@localhost/rionpc">
<x xmlns="vcard-temp:x:update">
<photo>17761ab7de422f048f1cd449bd4f003925dbc4c0</photo>
</x>
<c xmlns="http://jabber.org/protocol/caps" hash="sha-1" node="http://www.process-one.net/en/ejabberd/" ver="ug2PblIAwfYUkiKIGxaVMDGKD/4="/>
</presence>

<message from="[email protected]" id="724870792862519450" to="rion@localhost/rionpc" type="groupchat">
<x xmlns="http://jabber.org/protocol/muc#user">
<status code="104"/>
</x>
</message>

this triggers my code to query disco#info

<iq id="b481ab5f-5311-4829-984d-80899c9c2a48" to="[email protected]" type="get">
<query xmlns="http://jabber.org/protocol/disco#info"/>
</iq>

which looks like this

<iq from="[email protected]" id="b481ab5f-5311-4829-984d-80899c9c2a48" to="rion@localhost/rionpc" type="result" xml:lang="en">
<query xmlns="http://jabber.org/protocol/disco#info">
<identity category="conference" type="text"/>
<feature var="vcard-temp"/>
<feature var="http://jabber.org/protocol/muc"/>
<feature var="http://jabber.org/protocol/disco#info"/>
<feature var="http://jabber.org/protocol/disco#items"/>
<feature var="http://jabber.org/protocol/commands"/>
<feature var="urn:xmpp:message-moderate:0"/>
<feature var="urn:xmpp:message-retract:1"/>
<feature var="muc_public"/>
<feature var="muc_temporary"/>
<feature var="muc_open"/>
<feature var="muc_semianonymous"/>
<feature var="muc_moderated"/>
<feature var="muc_unsecured"/>
<feature var="jabber:iq:register"/>
<feature var="urn:xmpp:mam:tmp"/>
<feature var="urn:xmpp:mam:0"/>
<feature var="urn:xmpp:mam:1"/>
<feature var="urn:xmpp:mam:2"/>
<feature var="urn:xmpp:sid:0"/>
<x xmlns="jabber:x:data" type="result">
<field type="hidden" var="FORM_TYPE">
<value>http://jabber.org/protocol/muc#roominfo</value>
</field>
<field label="Number of occupants" type="text-single" var="muc#roominfo_occupants">
<value>1</value>
</field>
<field label="Natural-Language Room Name" type="text-single" var="muc#roomconfig_roomname"/>
<field label="Room description" type="text-single" var="muc#roominfo_description"/>
<field label="Occupants May Change the Subject" type="boolean" var="muc#roomconfig_changesubject">
<value>1</value>
</field>
<field label="Occupants are allowed to invite others" type="boolean" var="muc#roomconfig_allowinvites">
<value>0</value>
</field>
<field label="Occupants are allowed to query others" type="boolean" var="muc#roomconfig_allow_query_users">
<value>1</value>
</field>
<field label="Roles that May Send Private Messages" type="list-single" var="muc#roomconfig_allowpm">
<value>anyone</value>
<option label="Anyone">
<value>anyone</value>
</option>
<option label="Anyone with Voice">
<value>participants</value>
</option>
<option label="Moderators Only">
<value>moderators</value>
</option>
<option label="Nobody">
<value>none</value>
</option>
</field>
<field label="Natural Language for Room Discussions" type="text-single" var="muc#roominfo_lang">
<value>en</value>
</field>
</x>
</query>
</iq>

According to XEP-0486 there has to be roominfo_avatarhash in disco result, and if it's not there that means avatar is not set.
So my code relies on this and removes this muc's avatar from its cache. But in fact ejabberd still has it avatar.

I believe something has to be fixed. the xep or ejabberd.

@Neustradamus
Copy link
Contributor

@prefiks, @badlop: What do you think?

@prefiks
Copy link
Member

prefiks commented Jun 18, 2024

Looks like this is was added in later revision of this xep, than what ejabberd implements. I will see what can be done about it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants