Mercurial > libervia-backend
diff libervia/backend/plugins/plugin_xep_0424.py @ 4381:3c97717fd662
plugin XEP-0428: Add missing "for" attribute:
The "for" attribute was missing from <fallback> element.
rel 461
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 04 Jul 2025 12:30:20 +0200 |
parents | 79d463e3fdeb |
children |
line wrap: on
line diff
--- a/libervia/backend/plugins/plugin_xep_0424.py Fri Jul 04 12:28:40 2025 +0200 +++ b/libervia/backend/plugins/plugin_xep_0424.py Fri Jul 04 12:30:20 2025 +0200 @@ -16,7 +16,7 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. import time -from typing import Any, Dict +from typing import Any, Dict, cast from sqlalchemy.orm.attributes import flag_modified from twisted.internet import defer @@ -31,6 +31,7 @@ from libervia.backend.core.i18n import D_, _ from libervia.backend.core.log import getLogger from libervia.backend.memory.sqla_mapping import History +from libervia.backend.plugins.plugin_xep_0428 import XEP_0428 from libervia.backend.tools.common import data_format log = getLogger(__name__) @@ -111,8 +112,10 @@ message_elt["type"] = history.type retract_elt = message_elt.addElement((NS_MESSAGE_RETRACT, "retract")) retract_elt["id"] = retract_id - self.host.plugins["XEP-0428"].add_fallback_elt( + fallback = cast(XEP_0428, self.host.plugins["XEP-0428"]) + fallback.add_fallback_elt( message_elt, + NS_MESSAGE_RETRACT, "[A message retraction has been requested, but your client doesn't support " "it]", )