[MOD] Do not send an edit stanza.

This commit is contained in:
LDA 2024-07-10 11:57:29 +02:00
commit d71f7d2f49
2 changed files with 6 additions and 11 deletions

View file

@ -403,21 +403,17 @@ ParseeEventHandler(ParseeData *data, HashMap *event)
} }
/* Some clients don't support retractions *at all*, which smell. /* Some clients don't support retractions *at all*, which smell.
* This therefore serves as a fallback, just in case that fails. */ * This therefore serves as a fallback, just in case that fails.
XMPPSendPlain( *
jabber, from, to, * TODO: BAD IDEA. XMPP CLIENTS, FUCKING IMPLEMENT IT YOU LAZY
"[EDIT REDACT FROM PARSEE]", * FUCKTARDS.
(char *) type, */
NULL, NULL, redacted,
NULL, redacted_stanza
);
XMPPRetract(jabber, from, to, (char *) type, redacted_stanza); XMPPRetract(jabber, from, to, (char *) type, redacted_stanza);
Free(redacted_stanza); Free(redacted_stanza);
Free(chat_id); Free(chat_id);
Free(from); Free(from);
Free(to); Free(to);
/* TODO: Implement Matrix->XMPP redactions. */
} }
} }

View file

@ -441,7 +441,7 @@ MessageStanza(ParseeData *args, XMLElement *stanza, XMPPThread *thr)
if (!resource && chat_id) if (!resource && chat_id)
{ {
event_id = ParseeGetEventFromID(args, stanza, moderated); event_id = ParseeGetEventFromID(args, stanza, moderated);
ASRedact(args->config, mroom_id, encoded, event_id); ASRedact(args->config, mroom_id, NULL, event_id);
ParseePushAllStanza(args, stanza, event_id); ParseePushAllStanza(args, stanza, event_id);
pthread_mutex_unlock(&thr->info->chk_lock); pthread_mutex_unlock(&thr->info->chk_lock);
@ -666,7 +666,6 @@ MessageStanza(ParseeData *args, XMLElement *stanza, XMPPThread *thr)
else if (retracted) else if (retracted)
{ {
event_id = ParseeGetEventFromID(args, stanza, retracted); event_id = ParseeGetEventFromID(args, stanza, retracted);
Log(LOG_WARNING, "RETRACTING %s %s", retracted, event_id);
ASRedact(args->config, mroom_id, encoded, event_id); ASRedact(args->config, mroom_id, encoded, event_id);
ParseePushAllStanza(args, stanza, event_id); ParseePushAllStanza(args, stanza, event_id);
pthread_mutex_unlock(&thr->info->chk_lock); pthread_mutex_unlock(&thr->info->chk_lock);