#966 mod_block_strangers block mood/tune updates to your own JID

Reporter Sergey Popov
Owner Nobody
Created
Updated
Stars ★ (1)  
Tags
  • Status-New
  • Priority-Medium
  • Type-Defect
  1. Sergey Popov on

    What steps will reproduce the problem? 1. install and activate mod_block_strangers from prosody-modules 2. alter mood/tune in your jabber client What is the expected output? Seeing changed mood/tune in your own client What do you see instead? Mood/tune changing did not show in your own client What version of the product are you using? On what operating system? Prosody 0.9.12, latest prosody-modules. Gentoo Linux Please provide any additional information below. This patch fixes issue: diff -r b1c5b0c369c2 mod_block_strangers/mod_block_strangers.lua --- a/mod_block_strangers/mod_block_strangers.lua Thu Jul 27 16:46:18 2017 +0200 +++ b/mod_block_strangers/mod_block_strangers.lua Mon Aug 07 12:34:39 2017 +0300 @@ -20,6 +20,10 @@ local to_user, to_host, to_resource = jid_split(stanza.attr.to); local from_jid = jid_bare(stanza.attr.from); if to_user and not has_directed_presence(stanza.attr.to, from_jid) and not is_contact_subscribed(to_user, to_host, from_jid) then + -- Allow all messages from your own jid + if from_jid == to_user.."@"..to_host then + return nil; -- Pass through + end if to_resource and stanza.attr.type == "groupchat" or stanza.name == "iq" and (stanza.attr.type == "result" or stanza.attr.type == "error") then return nil; -- Pass through

New comment