25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-20 16:15:59 +01:00

Output muc#roominfo_avatarhash in room disco info as per updated xep-0486

This should fix issue #4234.
This commit is contained in:
Paweł Chmielowski 2024-07-16 18:54:48 +02:00
parent 0fdbb03f54
commit 926f60b2ed
4 changed files with 10 additions and 4 deletions

View File

@ -145,7 +145,7 @@ defmodule Ejabberd.MixProject do
{:p1_utils, "~> 1.0"}, {:p1_utils, "~> 1.0"},
{:pkix, "~> 1.0"}, {:pkix, "~> 1.0"},
{:stringprep, ">= 1.0.26"}, {:stringprep, ">= 1.0.26"},
{:xmpp, git: "https://github.com/processone/xmpp.git", ref: "ce76eda23d8c7654a815f50de6c7cfcaa6c46850", override: true}, {:xmpp, git: "https://github.com/processone/xmpp.git", ref: "9728433608e25d196a49ed0f609208e353621135", override: true},
{:yconf, "~> 1.0"}] {:yconf, "~> 1.0"}]
++ cond_deps() ++ cond_deps()
end end

View File

@ -69,7 +69,7 @@
{stringprep, "~> 1.0.29", {git, "https://github.com/processone/stringprep", {tag, "1.0.30"}}}, {stringprep, "~> 1.0.29", {git, "https://github.com/processone/stringprep", {tag, "1.0.30"}}},
{if_var_true, stun, {if_var_true, stun,
{stun, "~> 1.2.12", {git, "https://github.com/processone/stun", {tag, "1.2.13"}}}}, {stun, "~> 1.2.12", {git, "https://github.com/processone/stun", {tag, "1.2.13"}}}},
{xmpp, "~> 1.8.2", {git, "https://github.com/processone/xmpp", "ce76eda23d8c7654a815f50de6c7cfcaa6c46850"}}, {xmpp, "~> 1.8.2", {git, "https://github.com/processone/xmpp", "9728433608e25d196a49ed0f609208e353621135"}},
{yconf, "~> 1.0.15", {git, "https://github.com/processone/yconf", {tag, "1.0.16"}}} {yconf, "~> 1.0.15", {git, "https://github.com/processone/yconf", {tag, "1.0.16"}}}
]}. ]}.

View File

@ -26,7 +26,7 @@
{<<"unicode_util_compat">>,{pkg,<<"unicode_util_compat">>,<<"0.7.0">>},1}, {<<"unicode_util_compat">>,{pkg,<<"unicode_util_compat">>,<<"0.7.0">>},1},
{<<"xmpp">>, {<<"xmpp">>,
{git,"https://github.com/processone/xmpp", {git,"https://github.com/processone/xmpp",
{ref,"ce76eda23d8c7654a815f50de6c7cfcaa6c46850"}}, {ref,"9728433608e25d196a49ed0f609208e353621135"}},
0}, 0},
{<<"yconf">>,{pkg,<<"yconf">>,<<"1.0.16">>},0}]}. {<<"yconf">>,{pkg,<<"yconf">>,<<"1.0.16">>},0}]}.
[ [

View File

@ -4576,8 +4576,14 @@ iq_disco_info_extras(Lang, StateData, Static) ->
false -> false ->
Fs3 Fs3
end, end,
Fs5 = case (StateData#state.config)#config.vcard_xupdate of
Hash when is_binary(Hash) ->
[{avatarhash, [Hash]} | Fs4];
_ ->
Fs4
end,
#xdata{type = result, #xdata{type = result,
fields = muc_roominfo:encode(Fs4, Lang)}. fields = muc_roominfo:encode(Fs5, Lang)}.
-spec process_iq_disco_items(jid(), iq(), state()) -> -spec process_iq_disco_items(jid(), iq(), state()) ->
{error, stanza_error()} | {result, disco_items()}. {error, stanza_error()} | {result, disco_items()}.