[MOD] Start preparing for an alpha

The (9)th.
This commit is contained in:
LDA 2024-09-01 21:19:24 +02:00
commit 34bd036ab7
6 changed files with 58 additions and 7 deletions

View file

@ -385,11 +385,25 @@ end_error:
}
else if (replaced && data)
{
/* TODO: Unify these. Maybe even make a function
* that objectifies a stanza. */
size_t off =
reply_to ? ParseeFindDatastart(data->data) : 0;
HashMap *ev = ShoveStanza(
MatrixCreateReplace(event_id, data->data + off),
stanza
);
if (reply_to)
{
char *reply_id =
ParseeGetEventFromID(args, stanza, reply_to);
MatrixSetReply(ev, reply_id);
Free(reply_id);
}
event_id = ParseeGetEventFromID(args, stanza, replaced);
Free(ASSend(
args->config, mroom_id, encoded,
"m.room.message",
ShoveStanza(MatrixCreateReplace(event_id, data->data), stanza)
"m.room.message", ev
));
ParseePushAllStanza(args, stanza, event_id);
pthread_mutex_unlock(&thr->info->chk_lock);