Announce support for stanza IDs

Announce the namespace for stanza IDs as per XEP-0359 v0.5.0.
This commit is contained in:
Holger Weiss 2017-11-15 00:18:25 +01:00
parent 06d4f1ff33
commit 2b3890f1b0
2 changed files with 4 additions and 2 deletions

View File

@ -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.

View File

@ -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,