mirror of
https://forge.fsky.io/lda/Parsee.git
synced 2026-03-13 21:15:11 +00:00
[FIX] Fix out edits
This commit is contained in:
parent
53739dd42d
commit
5d268a71a5
1 changed files with 5 additions and 10 deletions
|
|
@ -192,7 +192,7 @@ end_error:
|
||||||
|
|
||||||
/* TODO: CLEAN THAT UP INTO A CREATEDM FUNCTION */
|
/* TODO: CLEAN THAT UP INTO A CREATEDM FUNCTION */
|
||||||
mroom_id = ParseeGetBridgedRoom(args, stanza);
|
mroom_id = ParseeGetBridgedRoom(args, stanza);
|
||||||
Log(LOG_DEBUG, "Bridging to '%s'", mroom_id);
|
Log(LOG_DEBUG, "Bridging event to '%s'...", mroom_id);
|
||||||
if (!mroom_id && !room && !XMPPIsParseeStanza(stanza) &&
|
if (!mroom_id && !room && !XMPPIsParseeStanza(stanza) &&
|
||||||
to && *to == '@')
|
to && *to == '@')
|
||||||
{
|
{
|
||||||
|
|
@ -203,7 +203,7 @@ end_error:
|
||||||
ASRegisterUser(args->config, from_matrix);
|
ASRegisterUser(args->config, from_matrix);
|
||||||
room = ASCreateDM(args->config, from_matrix, to);
|
room = ASCreateDM(args->config, from_matrix, to);
|
||||||
mroom_id = StrDuplicate(room);
|
mroom_id = StrDuplicate(room);
|
||||||
Log(LOG_INFO, "Creating a DM to '%s'(%s)", to, mroom_id);
|
Log(LOG_INFO, "Creating a DM to '%s'(%s)...", to, mroom_id);
|
||||||
if (room)
|
if (room)
|
||||||
{
|
{
|
||||||
room_ref = DbCreate(args->db, 3, "rooms", room, "data");
|
room_ref = DbCreate(args->db, 3, "rooms", room, "data");
|
||||||
|
|
@ -394,18 +394,13 @@ end_error:
|
||||||
* that objectifies a stanza. */
|
* that objectifies a stanza. */
|
||||||
size_t off =
|
size_t off =
|
||||||
reply_to ? ParseeFindDatastart(data->data) : 0;
|
reply_to ? ParseeFindDatastart(data->data) : 0;
|
||||||
|
event_id = ParseeGetEventFromID(args, stanza, replaced);
|
||||||
HashMap *ev = ShoveStanza(
|
HashMap *ev = ShoveStanza(
|
||||||
MatrixCreateReplace(event_id, data->data + off),
|
MatrixCreateReplace(event_id, data->data + off),
|
||||||
stanza
|
stanza
|
||||||
);
|
);
|
||||||
if (reply_to)
|
|
||||||
{
|
Log(LOG_DEBUG, "Replacing events in %s(%s)", mroom_id, event_id);
|
||||||
char *reply_id =
|
|
||||||
ParseeGetEventFromID(args, stanza, reply_to);
|
|
||||||
MatrixSetReply(ev, reply_id);
|
|
||||||
Free(reply_id);
|
|
||||||
}
|
|
||||||
event_id = ParseeGetEventFromID(args, stanza, replaced);
|
|
||||||
Free(ASSend(
|
Free(ASSend(
|
||||||
args->config, mroom_id, encoded,
|
args->config, mroom_id, encoded,
|
||||||
"m.room.message", ev
|
"m.room.message", ev
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue