comparison sat/plugins/plugin_xep_0184.py @ 3715:b9718216a1c0 0.9

merge bookmark 0.9
author Goffi <goffi@goffi.org>
date Wed, 01 Dec 2021 16:13:31 +0100
parents 31628770a15a
children 524856bd7b19
comparison
equal deleted inserted replaced
3714:af09b5aaa5d7 3715:b9718216a1c0
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}")