From f6ba91ff979d81a78d38d1e395af2ba5456d099c Mon Sep 17 00:00:00 2001 From: vthriller Date: Thu, 19 May 2016 13:45:22 +0300 Subject: [PATCH] mod_roster should probably respect roster item changes introduced with roster_process_item hooks upon pushing --- src/mod_roster.erl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/mod_roster.erl b/src/mod_roster.erl index b3a627f7c..d66304796 100644 --- a/src/mod_roster.erl +++ b/src/mod_roster.erl @@ -382,14 +382,14 @@ process_item_set(From, To, Item = get_roster_by_jid_t(LUser, LServer, LJID), Item1 = process_item_attrs_managed(Item, Attrs, Managed), Item2 = process_item_els(Item1, Els), - case Item2#roster.subscription of - remove -> del_roster_t(LUser, LServer, LJID); - _ -> update_roster_t(LUser, LServer, LJID, Item2) - end, - send_itemset_to_managers(From, Item2, Managed), Item3 = ejabberd_hooks:run_fold(roster_process_item, LServer, Item2, [LServer]), + case Item3#roster.subscription of + remove -> del_roster_t(LUser, LServer, LJID); + _ -> update_roster_t(LUser, LServer, LJID, Item3) + end, + send_itemset_to_managers(From, Item3, Managed), case roster_version_on_db(LServer) of true -> write_roster_version_t(LUser, LServer); false -> ok -- 2.40.0