summaryrefslogtreecommitdiff
path: root/src/mod_roster.erl
diff options
context:
space:
mode:
authorLinus Jahn <lnj@kaidan.im>2022-06-12 15:55:59 +0200
committerbadlop <badlop@gmail.com>2022-08-11 12:45:20 +0200
commit7564a4e95368e41cc9d63371d942ebca50f537ce (patch)
tree8eb72c8d88ac807df62be6dfac4689b5270587a3 /src/mod_roster.erl
parentejabberd_listener: Let module take over socket (diff)
mod_mix_pam: Provide MIX channels as roster entries via hook
Diffstat (limited to '')
-rw-r--r--src/mod_roster.erl6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mod_roster.erl b/src/mod_roster.erl
index e2b17650..d3a0c6be 100644
--- a/src/mod_roster.erl
+++ b/src/mod_roster.erl
@@ -426,7 +426,11 @@ encode_item(Item) ->
both -> subscribe;
_ -> undefined
end,
- groups = Item#roster.groups}.
+ groups = Item#roster.groups,
+ mix_channel = case Item#roster.mix_participant_id of
+ <<>> -> undefined;
+ _ -> #mix_roster_channel{'participant-id' = Item#roster.mix_participant_id}
+ end}.
-spec decode_item(roster_item(), #roster{}, boolean()) -> #roster{}.
decode_item(#roster_item{subscription = remove} = Item, R, _) ->