From: Christophe Romain Date: Mon, 23 Feb 2009 15:56:19 +0000 (+0000) Subject: Do not call mod_caps:clear_caps as it breaks PubSub/PEP (EJAB-854) X-Git-Tag: v2.1.0~18^2~429 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=04fde3620decbc56984b3b91ff990863a87ca2cd;p=ejabberd Do not call mod_caps:clear_caps as it breaks PubSub/PEP (EJAB-854) SVN Revision: 1912 --- diff --git a/ChangeLog b/ChangeLog index f7863b148..9f2b176c3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-02-23 Christophe Romain + + * src/ejabberd_c2s.erl: Do not call mod_caps:clear_caps, this previous + optimization is too agressive and breaks PubSub/PEP standard behavior + (EJAB-854) + 2009-02-23 Alexey Shchepin * src/web/ejabberd_http.erl: Added a workaround for inet:peername diff --git a/src/ejabberd_c2s.erl b/src/ejabberd_c2s.erl index 6d68d249b..4b55e0250 100644 --- a/src/ejabberd_c2s.erl +++ b/src/ejabberd_c2s.erl @@ -1125,7 +1125,9 @@ handle_info({route, From, To, Packet}, StateName, StateData) -> %% Note contact availability case xml:get_attr_s("type", Attrs) of "unavailable" -> - mod_caps:clear_caps(From); + %mod_caps:clear_caps(From); + % caps clear disabled cause it breaks things + ok; _ -> Caps = mod_caps:read_caps(Els), mod_caps:note_caps(StateData#state.server, From, Caps)