25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-24 16:23:40 +01:00

Invalidate vcard_xupdate cache on all nodes when vcard is updated

This commit is contained in:
Paweł Chmielowski 2023-02-08 19:06:44 +01:00
parent 3de803be2f
commit 54cf37e917

View File

@ -107,7 +107,7 @@ user_send_packet(Acc) ->
-spec vcard_set(iq()) -> iq().
vcard_set(#iq{from = #jid{luser = LUser, lserver = LServer}} = IQ) ->
ets_cache:delete(?VCARD_XUPDATE_CACHE, {LUser, LServer}),
ets_cache:delete(?VCARD_XUPDATE_CACHE, {LUser, LServer}, ejabberd_cluster:get_nodes()),
ejabberd_sm:force_update_presence({LUser, LServer}),
IQ;
vcard_set(Acc) ->
@ -117,7 +117,7 @@ vcard_set(Acc) ->
remove_user(User, Server) ->
LUser = jid:nodeprep(User),
LServer = jid:nameprep(Server),
ets_cache:delete(?VCARD_XUPDATE_CACHE, {LUser, LServer}).
ets_cache:delete(?VCARD_XUPDATE_CACHE, {LUser, LServer}, ejabberd_cluster:get_nodes()).
%%====================================================================
%% Storage