diff --git a/ChangeLog b/ChangeLog index 7679c38df..24085ba59 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2008-11-26 Badlop + * src/mod_irc/mod_irc.erl: Announce disco#info (thanks to Spike) + * src/mod_muc/mod_muc.erl: Announce disco#info disco#items + * src/mod_proxy65/mod_proxy65_service.erl: No announce disco#items + * src/mod_pubsub/mod_pubsub.erl: Announce disco#info disco#items + * src/mod_vcard.erl: Announce disco#info + * src/gen_mod.erl: First store module options in ETS and Mnesia, then start the module. In case of failure, remove options from ETS. Until now the module was started before the options were diff --git a/src/mod_irc/mod_irc.erl b/src/mod_irc/mod_irc.erl index dd86037b9..dedd4f778 100644 --- a/src/mod_irc/mod_irc.erl +++ b/src/mod_irc/mod_irc.erl @@ -309,12 +309,10 @@ iq_disco(Lang) -> [{"category", "conference"}, {"type", "irc"}, {"name", translate:translate(Lang, "IRC Transport")}], []}, - {xmlelement, "feature", - [{"var", ?NS_MUC}], []}, - {xmlelement, "feature", - [{"var", ?NS_REGISTER}], []}, - {xmlelement, "feature", - [{"var", ?NS_VCARD}], []}]. + {xmlelement, "feature", [{"var", ?NS_DISCO_INFO}], []}, + {xmlelement, "feature", [{"var", ?NS_MUC}], []}, + {xmlelement, "feature", [{"var", ?NS_REGISTER}], []}, + {xmlelement, "feature", [{"var", ?NS_VCARD}], []}]. iq_get_vcard(Lang) -> [{xmlelement, "FN", [], diff --git a/src/mod_muc/mod_muc.erl b/src/mod_muc/mod_muc.erl index 812c8de97..880540bef 100644 --- a/src/mod_muc/mod_muc.erl +++ b/src/mod_muc/mod_muc.erl @@ -508,6 +508,8 @@ iq_disco_info(Lang) -> [{"category", "conference"}, {"type", "text"}, {"name", translate:translate(Lang, "Chatrooms")}], []}, + {xmlelement, "feature", [{"var", ?NS_DISCO_INFO}], []}, + {xmlelement, "feature", [{"var", ?NS_DISCO_ITEMS}], []}, {xmlelement, "feature", [{"var", ?NS_MUC}], []}, {xmlelement, "feature", [{"var", ?NS_REGISTER}], []}, {xmlelement, "feature", [{"var", ?NS_VCARD}], []}]. diff --git a/src/mod_proxy65/mod_proxy65_service.erl b/src/mod_proxy65/mod_proxy65_service.erl index 2b252c122..23f41d4ef 100644 --- a/src/mod_proxy65/mod_proxy65_service.erl +++ b/src/mod_proxy65/mod_proxy65_service.erl @@ -196,7 +196,6 @@ iq_disco_info(Lang, Name) -> {"type", "bytestreams"}, {"name", translate:translate(Lang, Name)}], []}, ?FEATURE(?NS_DISCO_INFO), - ?FEATURE(?NS_DISCO_ITEMS), ?FEATURE(?NS_VCARD), ?FEATURE(?NS_BYTESTREAMS)]. diff --git a/src/mod_pubsub/mod_pubsub.erl b/src/mod_pubsub/mod_pubsub.erl index 24f39c9f2..a1d6febf2 100644 --- a/src/mod_pubsub/mod_pubsub.erl +++ b/src/mod_pubsub/mod_pubsub.erl @@ -760,6 +760,8 @@ iq_disco_info(Host, SNode, From, Lang) -> [{"category", "pubsub"}, {"type", "service"}, {"name", translate:translate(Lang, "Publish-Subscribe")}], []}, + {xmlelement, "feature", [{"var", ?NS_DISCO_INFO}], []}, + {xmlelement, "feature", [{"var", ?NS_DISCO_ITEMS}], []}, {xmlelement, "feature", [{"var", ?NS_PUBSUB}], []}, {xmlelement, "feature", [{"var", ?NS_VCARD}], []}] ++ lists:map(fun(Feature) -> diff --git a/src/mod_vcard.erl b/src/mod_vcard.erl index 004a238d1..c2c00b954 100644 --- a/src/mod_vcard.erl +++ b/src/mod_vcard.erl @@ -138,9 +138,9 @@ get_sm_features(Acc, _From, _To, Node, _Lang) -> [] -> case Acc of {result, Features} -> - {result, [?NS_VCARD | Features]}; + {result, [?NS_DISCO_INFO, ?NS_VCARD | Features]}; empty -> - {result, [?NS_VCARD]} + {result, [?NS_DISCO_INFO, ?NS_VCARD]} end; _ -> Acc @@ -378,6 +378,8 @@ do_route(ServerHost, From, To, Packet) -> {"name", translate:translate(Lang, "vCard User Search")}], []}, + {xmlelement, "feature", + [{"var", ?NS_DISCO_INFO}], []}, {xmlelement, "feature", [{"var", ?NS_SEARCH}], []}, {xmlelement, "feature",