diff options
author | Matthew Wild <mwild1@gmail.com> | 2020-03-12 14:10:12 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2020-03-12 14:10:12 +0000 |
commit | ed68050d3304f55cf5916ac228e28f8432968f3e (patch) | |
tree | d6a10e241ccab42b3192a24ecb3ade48a9b53d7a /.busted | |
parent | c0dbc18d7cd9db8ab6316253220ff67d8cb91b03 (diff) | |
download | prosody-ed68050d3304f55cf5916ac228e28f8432968f3e.tar.gz prosody-ed68050d3304f55cf5916ac228e28f8432968f3e.zip |
MUC: Pass previous role to :publicise_occupant_status() whenever possible
Currently there is what amounts to a hack in presence_broadcast.lib.lua to
make it always broadcast presence with roles of "none". This is to ensure
that if you previously saw available presence for someone, you will also
see the unavailable presence (which always has role="none").
The correct approach is to take into account what the previous role was (
i.e. answer the question: "Was the available presence for this occupant
a role for which presence broadcast is enabled?).
The logic is already in place to do this correctly, but most call sites
do not provide the previous role (prev_role argument) of the occupant,
which causes it to not be used. In its place the hack to always broadcast
presence of role="none" has allowed things to continue to work.
The intention is that a subsequent commit will remove the unconditional
broadcast of role="none".
Diffstat (limited to '.busted')
0 files changed, 0 insertions, 0 deletions