xmpp: Fix webhook not working if using avatar relaying
This commit is contained in:
parent
963deb705a
commit
edf70774a2
@ -74,4 +74,5 @@ class AvatarManager:
|
||||
"""
|
||||
Returns either the URL to the avatar of @jid or None.
|
||||
"""
|
||||
return self._avatars.get(jid, None)
|
||||
filename = self._avatars.get(jid, None)
|
||||
return self._public + filename if filename else None
|
||||
|
@ -263,11 +263,16 @@ class BridgeComponent(ComponentXMPP):
|
||||
|
||||
self._logger.debug("Webhook: %s", str(webhook))
|
||||
|
||||
requests.post(self._webhooks[muc],
|
||||
req = requests.post(self._webhooks[muc],
|
||||
data=webhook,
|
||||
headers={
|
||||
"Content-Type": "application/json"
|
||||
})
|
||||
if req.status_code != 200:
|
||||
self._logger.error("Failed to POST to %s with content %s: %s",
|
||||
self._webhooks[muc],
|
||||
str(webhook),
|
||||
req.text)
|
||||
|
||||
def virtual_user_update_presence(self, muc, uid, pshow, pstatus=None):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user