Skip to content

Commit

Permalink
mod_pep: properly fix #464.
Browse files Browse the repository at this point in the history
  • Loading branch information
maranda committed Feb 24, 2019
1 parent 8c7f345 commit be3198f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions plugins/mod_pep.lua
Original file line number Diff line number Diff line change
Expand Up @@ -551,8 +551,13 @@ function presence_handler(event)
if not hash_map[hash] then
if current ~= false then disco_info_query(user, recipient); end
else
if not origin.sent_initial_pep_notifications then pep_send(recipient, user); end
if self and not origin.sent_initial_pep_notifications then origin.sent_initial_pep_notifications = true; end
local bare_recipient = jid_bare(recipient);
if user == bare_recipient and not origin.sent_initial_pep_notifications then
origin.sent_initial_pep_notifications = true;
pep_send(recipient, user);
elseif user ~= bare_recipient then
pep_send(recipient, user);
end
end
if self and not user_bare_session.initial_pep_broadcast then -- re-broadcast to all interested contacts on connect, shall we?
local our_jid = origin.full_jid;
Expand Down

0 comments on commit be3198f

Please sign in to comment.