comparison sat/plugins/plugin_xep_0184.py @ 3585:31628770a15a

core (xmpp): renamed `SatRosterProtocol.presenceSubscribed` to `isSubscribedFrom` (and added `isSubscribedTo`)
author Goffi <goffi@goffi.org>
date Wed, 28 Jul 2021 22:15:31 +0200
parents 559a625a236b
children 524856bd7b19
comparison
equal deleted inserted replaced
3584:edc79cefe968 3585:31628770a15a
148 """This method is called on message delivery receipts **request** (XEP-0184 #7) 148 """This method is called on message delivery receipts **request** (XEP-0184 #7)
149 @param msg_elt: message element 149 @param msg_elt: message element
150 @param client: %(doc_client)s""" 150 @param client: %(doc_client)s"""
151 from_jid = jid.JID(msg_elt["from"]) 151 from_jid = jid.JID(msg_elt["from"])
152 152
153 if self._isActif(client.profile) and client.roster.isPresenceAuthorised(from_jid): 153 if self._isActif(client.profile) and client.roster.isSubscribedFrom(from_jid):
154 received_elt_ret = domish.Element((NS_MESSAGE_DELIVERY_RECEIPTS, "received")) 154 received_elt_ret = domish.Element((NS_MESSAGE_DELIVERY_RECEIPTS, "received"))
155 try: 155 try:
156 received_elt_ret["id"] = msg_elt["id"] 156 received_elt_ret["id"] = msg_elt["id"]
157 except KeyError: 157 except KeyError:
158 log.warning(f"missing id for message element: {msg_elt.toXml}") 158 log.warning(f"missing id for message element: {msg_elt.toXml}")