diff --git a/big_tests/dynamic_domains.spec b/big_tests/dynamic_domains.spec index 696f92b2c9..31eed5401d 100644 --- a/big_tests/dynamic_domains.spec +++ b/big_tests/dynamic_domains.spec @@ -31,9 +31,6 @@ {suites, "tests", inbox_extensions_SUITE}. {suites, "tests", mam_SUITE}. -{skip_cases, "tests", mam_SUITE, - [muc_service_discovery, mam_service_discovery], - "at the moment mod_mam config options don't support dynamic domains"}. {skip_cases, "tests", mam_SUITE, [messages_filtered_when_prefs_default_policy_is_roster], "at the moment mod_roster doesn't support dynamic domains"}. diff --git a/src/mam/mod_mam.erl b/src/mam/mod_mam.erl index 398a5d5c30..25b6d68ec9 100644 --- a/src/mam/mod_mam.erl +++ b/src/mam/mod_mam.erl @@ -245,8 +245,8 @@ process_mam_iq(Acc, From, To, IQ, _Extra) -> end. -spec disco_local_features(mongoose_disco:feature_acc()) -> mongoose_disco:feature_acc(). -disco_local_features(Acc = #{to_jid := #jid{lserver = LServer}, node := <<>>}) -> - mongoose_disco:add_features(features(?MODULE, LServer), Acc); +disco_local_features(Acc = #{host_type := HostType, node := <<>>}) -> + mongoose_disco:add_features(features(?MODULE, HostType), Acc); disco_local_features(Acc) -> Acc. diff --git a/src/mam/mod_mam_muc.erl b/src/mam/mod_mam_muc.erl index 4889ec7a88..27c85b15ef 100644 --- a/src/mam/mod_mam_muc.erl +++ b/src/mam/mod_mam_muc.erl @@ -162,8 +162,8 @@ stop(HostType) -> %% hooks and handlers for MUC -spec disco_muc_features(mongoose_disco:feature_acc()) -> mongoose_disco:feature_acc(). -disco_muc_features(Acc = #{to_jid := #jid{lserver = LServer}, node := <<>>}) -> - mongoose_disco:add_features(features(?MODULE, LServer), Acc); +disco_muc_features(Acc = #{host_type := HostType, node := <<>>}) -> + mongoose_disco:add_features(features(?MODULE, HostType), Acc); disco_muc_features(Acc) -> Acc. diff --git a/src/mam/mod_mam_utils.erl b/src/mam/mod_mam_utils.erl index 6bb7938bfe..f7e65dddca 100644 --- a/src/mam/mod_mam_utils.erl +++ b/src/mam/mod_mam_utils.erl @@ -634,14 +634,14 @@ maybe_get_result_namespace(Packet) -> is_mam_namespace(NS) -> lists:member(NS, mam_features()). -features(Module, Host) -> - mam_features() ++ retraction_features(Module, Host). +features(Module, HostType) -> + mam_features() ++ retraction_features(Module, HostType). mam_features() -> [?NS_MAM_04, ?NS_MAM_06]. -retraction_features(Module, Host) -> - case has_message_retraction(Module, Host) of +retraction_features(Module, HostType) -> + case has_message_retraction(Module, HostType) of true -> [?NS_RETRACT, ?NS_RETRACT_TOMBSTONE]; false -> [?NS_RETRACT] end.