mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-20 17:27:00 +01:00
mod_pubsub: Don't blindly echo PEP notification
Since commit514c25caef
, whenever a PEP item was published, a notification was blindly sent back to the owner. However, this should only be done subject to +notify filtering, as per XEP-0163: | the PEP service shall send notifications to all of the account owner's | available resources (subject to notification filtering). The motivation for the mentioned commit was that +notify subscriptions initially didn't work for PEP node owners (#2108). However, that issue was fixed by commit5968bc9318
(#2112). As a result, the owner's client was actually notified twice if the client was subscribed to the node (e.g., via +notify). Therefore, just omit the additional, blind notification. Thanks to W. Martin Borgert and Daniel Gultsch for reporting the issue.
This commit is contained in:
parent
d4b30957a3
commit
3469a51f58
@ -3052,9 +3052,7 @@ broadcast_stanza({LUser, LServer, LResource}, Publisher, Node, Nidx, Type, NodeO
|
||||
extended_headers([Publisher])),
|
||||
Pred = fun(To) -> delivery_permitted(Owner, To, NodeOptions) end,
|
||||
ejabberd_sm:route(jid:make(LUser, LServer, SenderResource),
|
||||
{pep_message, <<((Node))/binary, "+notify">>, Stanza, Pred}),
|
||||
ejabberd_router:route(xmpp:set_to(xmpp:put_meta(Stanza, ignore_sm_bounce, true),
|
||||
jid:make(LUser, LServer)));
|
||||
{pep_message, <<((Node))/binary, "+notify">>, Stanza, Pred});
|
||||
broadcast_stanza(Host, _Publisher, Node, Nidx, Type, NodeOptions, SubsByDepth, NotifyType, BaseStanza, SHIM) ->
|
||||
broadcast_stanza(Host, Node, Nidx, Type, NodeOptions, SubsByDepth, NotifyType, BaseStanza, SHIM).
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user