# HG changeset patch # User Goffi # Date 1634283127 -7200 # Node ID a017af61a32b12821a8a6f85b9e38654a611c20d # Parent c9238fca1fb36ef01384ecdcc82b115d4a424a4e privilege: add server JID to `publisher` so `+notify` works with it: the server's PEP itself is now working as other PEP accounts, i.e. notification of last published message are sent on presence received when `+notify` is used. diff -r c9238fca1fb3 -r a017af61a32b CHANGELOG --- a/CHANGELOG Fri Oct 15 09:32:07 2021 +0200 +++ b/CHANGELOG Fri Oct 15 09:32:07 2021 +0200 @@ -4,10 +4,11 @@ - publish-options implementation - max_items configuration option - Full-Text Search, with node setting to specify language - - XEP-0346 (Form Discovery and Publishing) implementation (replacing the non standard node schema) + - Form Discovery and Publishing (XEP-0346) implementation (replacing the non standard node schema) - environment variables can now be used to set options - server jid can now be specified with "server_jid" parameter, otherwise it's determined automatically - service name can now be specified with "service_name" parameter + - PEP is now working for server itself, making it usable for Service Outage Status (XEP-0455) - namespace delegation update to v0.5 ("urn:xmpp:delegation:2" is now used) - bug fixes diff -r c9238fca1fb3 -r a017af61a32b sat_pubsub/privilege.py --- a/sat_pubsub/privilege.py Fri Oct 15 09:32:07 2021 +0200 +++ b/sat_pubsub/privilege.py Fri Oct 15 09:32:07 2021 +0200 @@ -292,8 +292,12 @@ nodes = tuple(self.hash_map[disco_tuple]['notify']) if not nodes: return - # publishers are entities which have granted presence access to our user + user itself - publishers = tuple(self.presence_map.get(from_jid_bare, ())) + (from_jid_bare,) + # publishers are entities which have granted presence access to our user + # + user itself + server + publishers = ( + tuple(self.presence_map.get(from_jid_bare, ())) + + (from_jid_bare, self.backend.server_jid) + ) # FIXME: add "presence" access_model (for node) for getLastItems last_items = yield self._backend.storage.getLastItems(publishers, nodes, ('open',), ('open',), True)