-
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
Requires bridge component JID to be a MUC moderator.
atl.chat/apps/bridge/src/bridge/adapters/xmpp/handlers.py
Lines 438 to 439 in 151f2c8
| # Option 1 hack: also send XEP-0425 moderation so Dino (and similar clients) delete locally. | |
| # Requires bridge component JID to be a MUC moderator. |
logger.info("XMPP retraction bridged: room={} author={} message={}", room_jid, nick, target_msg_id)
comp._bus.publish("xmpp", evt)
# Option 1 hack: also send XEP-0425 moderation so Dino (and similar clients) delete locally.
# Requires bridge component JID to be a MUC moderator.
if cfg.xmpp_promote_retraction_to_moderation and target_msg_id:
comp._recently_moderated_by_us[dedupe_key] = None
task = asyncio.create_task(_send_moderation_for_retraction(comp, room_jid, target_msg_id))
comp._moderation_tasks.add(task)
task.add_done_callback(comp._moderation_tasks.discard)
def on_moderated_message(comp: XMPPComponent, msg: Any) -> None:
"""Handle XEP-0425 moderator retraction; emit delete to bus."""
from_jid = str(msg["from"]) if msg["from"] else ""
# XEP-0425 §5: only moderation from the MUC service (bare room JID) is legitimate
if "/" in from_jid:
return # From occupant; discard (spoofing)
room_jid = from_jid
if not room_jid:
return
Reactions are currently unavailable