[FIX] Properly handle new contents with Matrix

No more ugly asterisks. It annoyed me enough.
This commit is contained in:
LDA 2024-12-28 20:17:03 +01:00
commit 86deab29af
2 changed files with 36 additions and 3 deletions

View file

@ -370,6 +370,7 @@ ParseeMessageHandler(ParseeData *data, HashMap *event)
DbRef *ref = NULL;
HashMap *json;
char *unedited_id = MatrixGetEdit(event);
char *body = GrabString(event, 2, "content", "body");
char *id = GrabString(event, 1, "room_id");
char *ev_id = GrabString(event, 1, "event_id");
@ -381,12 +382,17 @@ ParseeMessageHandler(ParseeData *data, HashMap *event)
char *unauth = NULL;
char *origin_id = NULL, *stanza = NULL;
char *sender = NULL;
char *unedited_id = MatrixGetEdit(event);
char *url = GrabString(event, 2, "content", "url");
char *encoded_from = NULL;
bool direct = false;
if (unedited_id)
{
char *new_content = GrabString(event, 3, "content", "m.new_content", "body");
if (new_content) body = new_content;
}
if (ParseeIsPuppet(data->config, m_sender) ||
ParseeManageBan(data, m_sender, id))
{