From: Holger Weiss Date: Tue, 14 Nov 2017 23:18:25 +0000 (+0100) Subject: Announce support for stanza IDs X-Git-Tag: 17.11~35 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2b3890f1b0237eb284853c0d6e9248a73c0be6cf;p=ejabberd Announce support for stanza IDs Announce the namespace for stanza IDs as per XEP-0359 v0.5.0. --- diff --git a/src/mod_mam.erl b/src/mod_mam.erl index 7c7107715..3d3d9a2bc 100644 --- a/src/mod_mam.erl +++ b/src/mod_mam.erl @@ -27,6 +27,7 @@ -protocol({xep, 313, '0.6.1'}). -protocol({xep, 334, '0.2'}). +-protocol({xep, 359, '0.5.0'}). -behaviour(gen_mod). @@ -453,7 +454,8 @@ disco_sm_features(empty, From, To, Node, Lang) -> disco_sm_features({result, OtherFeatures}, #jid{luser = U, lserver = S}, #jid{luser = U, lserver = S}, <<"">>, _Lang) -> - {result, [?NS_MAM_TMP, ?NS_MAM_0, ?NS_MAM_1, ?NS_MAM_2 | OtherFeatures]}; + {result, [?NS_MAM_TMP, ?NS_MAM_0, ?NS_MAM_1, ?NS_MAM_2, ?NS_SID_0 | + OtherFeatures]}; disco_sm_features(Acc, _From, _To, _Node, _Lang) -> Acc. diff --git a/src/mod_muc_room.erl b/src/mod_muc_room.erl index 67a1a2bd3..bafa938dc 100644 --- a/src/mod_muc_room.erl +++ b/src/mod_muc_room.erl @@ -3617,7 +3617,7 @@ process_iq_disco_info(_From, #iq{type = get, lang = Lang}, StateData) -> ++ case {gen_mod:is_loaded(StateData#state.server_host, mod_mam), Config#config.mam} of {true, true} -> - [?NS_MAM_TMP, ?NS_MAM_0, ?NS_MAM_1, ?NS_MAM_2]; + [?NS_MAM_TMP, ?NS_MAM_0, ?NS_MAM_1, ?NS_MAM_2, ?NS_SID_0]; _ -> [] end,