mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-28 12:36:21 +00:00
message.c: Remove from/to setting out of condition
Since its done in both cases.
This commit is contained in:
@@ -1264,18 +1264,15 @@ _handle_carbons(xmpp_stanza_t *const stanza)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//TODO: maybe also add is_carbon maybe even an enum with outgoing/incoming
|
//TODO: maybe also add is_carbon maybe even an enum with outgoing/incoming
|
||||||
//could be that then we can have sv_ev_carbon no incoming/outgoing
|
|
||||||
if (message->plain || message->encrypted || message->body) {
|
if (message->plain || message->encrypted || message->body) {
|
||||||
|
message->from_jid = jid_from;
|
||||||
|
message->to_jid = jid_to;
|
||||||
|
|
||||||
// if we are the recipient, treat as standard incoming message
|
// if we are the recipient, treat as standard incoming message
|
||||||
if (g_strcmp0(mybarejid, jid_to->barejid) == 0) {
|
if (g_strcmp0(mybarejid, jid_to->barejid) == 0) {
|
||||||
message->from_jid = jid_from;
|
|
||||||
message->to_jid = jid_to;
|
|
||||||
sv_ev_incoming_carbon(message);
|
sv_ev_incoming_carbon(message);
|
||||||
|
|
||||||
// else treat as a sent message
|
// else treat as a sent message
|
||||||
} else {
|
} else {
|
||||||
message->from_jid = jid_from;
|
|
||||||
message->to_jid = jid_to;
|
|
||||||
sv_ev_outgoing_carbon(message);
|
sv_ev_outgoing_carbon(message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user