Mercurial > libervia-backend
comparison libervia/backend/plugins/plugin_xep_0033.py @ 4270:0d7bb4df2343
Reformatted code base using black.
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 19 Jun 2024 18:44:57 +0200 |
parents | 4b842c1fb686 |
children | 94e0968987cd |
comparison
equal
deleted
inserted
replaced
4269:64a85ce8be70 | 4270:0d7bb4df2343 |
---|---|
94 def disco_callback(entities): | 94 def disco_callback(entities): |
95 if not entities: | 95 if not entities: |
96 log.warning( | 96 log.warning( |
97 _("XEP-0033 is being used but the server doesn't support it!") | 97 _("XEP-0033 is being used but the server doesn't support it!") |
98 ) | 98 ) |
99 raise failure.Failure( | 99 raise failure.Failure(exceptions.CancelError("Cancelled by XEP-0033")) |
100 exceptions.CancelError("Cancelled by XEP-0033") | |
101 ) | |
102 if mess_data["to"] not in entities: | 100 if mess_data["to"] not in entities: |
103 expected = _(" or ").join([entity.userhost() for entity in entities]) | 101 expected = _(" or ").join([entity.userhost() for entity in entities]) |
104 log.warning( | 102 log.warning( |
105 _( | 103 _( |
106 "Stanzas using XEP-0033 should be addressed to %(expected)s, not %(current)s!" | 104 "Stanzas using XEP-0033 should be addressed to %(expected)s, not %(current)s!" |