[FIX/WIP] Plumbing, -Werror, death to hitmen

Suspend killers are now no more. Except the actual killers to be gone
eventually.
Plumbing is also very basic as of now, but it "works".
This commit is contained in:
LDA 2024-07-05 20:24:15 +02:00
commit bb836789b2
23 changed files with 310 additions and 165 deletions

View file

@ -28,7 +28,7 @@ ParseeMemberHandler(ParseeData *data, HashMap *event)
char *jid;
bool direct = GrabBoolean(event, 2, "content", "is_direct");
bool bot = !strncmp(sender + 1, local, strlen(local));
ASJoin(conf, room_id, state_key);
Free(ASJoin(conf, room_id, state_key));
jid = ParseeDecodeLocalJID(conf, state_key);
@ -70,7 +70,6 @@ ParseeBotHandler(ParseeData *data, HashMap *event)
char *msgtype = GrabString(event, 2, "content", "msgtype");
char *body = GrabString(event, 2, "content", "body");
char *id = GrabString(event, 1, "room_id");
char *ev_id = GrabString(event, 1, "event_id");
char *sender = GrabString(event, 1, "sender");
char *profile = StrConcat(4,
"@", data->config->sender_localpart,
@ -117,7 +116,7 @@ ParseeBotHandler(ParseeData *data, HashMap *event)
RouteCommand(data->handler, cmd, &arg);
}
end:
Free(profile);
CommandFree(cmd);
}
@ -128,16 +127,14 @@ ParseeMessageHandler(ParseeData *data, HashMap *event)
DbRef *ref = NULL;
HashMap *json;
char *msgtype = GrabString(event, 2, "content", "msgtype");
char *body = GrabString(event, 2, "content", "body");
char *id = GrabString(event, 1, "room_id");
char *ev_id = GrabString(event, 1, "event_id");
char *m_sender = GrabString(event, 1, "sender");
char *chat_id, *muc_id, *jid;
char *chat_id, *muc_id;
char *reply_id = MatrixGetReply(event);
char *xepd = ParseeXMPPify(event);
char *cmd_lp = data->config->sender_localpart;
char *type, *user, *xmppified_user = NULL, *to;
char *type, *user, *xmppified_user = NULL, *to = NULL;
char *unauth = NULL;
char *origin_id = NULL, *stanza = NULL;
char *sender = NULL;
@ -189,7 +186,7 @@ ParseeMessageHandler(ParseeData *data, HashMap *event)
}
else
{
char *name, *rev, *stanza;
char *name, *rev;
/* Try to find the chat ID */
muc_id = ParseeGetMUCID(data, chat_id);
if (!chat_id)