diff options
author | Linus Jahn <lnj@kaidan.im> | 2022-08-12 14:32:48 +0200 |
---|---|---|
committer | badlop <badlop@gmail.com> | 2022-08-12 17:07:28 +0200 |
commit | 4a52b73a17c1e9b486a7f107bc1ecf2bbc4add92 (patch) | |
tree | f0d5e161f10d4afafe7d8f81f081123eb701ef42 /src | |
parent | mod_mix, mod_mix_pam: Add new MIX namespaces to disco features (diff) |
mod_shared_roster: Fix wrong hook type #roster{} (now #roster_item{})
The hook type was changed from #roster{} to #roster_item{} by me in the
recent MIX changes. Unfortunately I've overseen this one (and unit tests
+ dialyzer passed).
Diffstat (limited to 'src')
-rw-r--r-- | src/mod_shared_roster.erl | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/mod_shared_roster.erl b/src/mod_shared_roster.erl index 067d4504..7d59e2fc 100644 --- a/src/mod_shared_roster.erl +++ b/src/mod_shared_roster.erl @@ -202,14 +202,13 @@ get_user_roster(Items, {_, S} = US) -> end, dict:new(), DisplayedGroups), {NewItems1, SRUsersRest} = lists:mapfoldl( - fun(Item, SRUsers1) -> - {_, _, {U1, S1, _}} = Item#roster.usj, - US1 = {U1, S1}, + fun(Item = #roster_item{jid = #jid{luser = User1, lserver = Server1}}, SRUsers1) -> + US1 = {User1, Server1}, case dict:find(US1, SRUsers1) of {ok, GroupLabels} -> - {Item#roster{subscription = both, - groups = Item#roster.groups ++ GroupLabels, - ask = none}, + {Item#roster_item{subscription = both, + groups = Item#roster_item.groups ++ GroupLabels, + ask = undefined}, dict:erase(US1, SRUsers1)}; error -> {Item, SRUsers1} |