mirror of
https://github.com/profanity-im/profanity.git
synced 2024-11-03 19:37:16 -05:00
xep-0308: Dont allow to correct MUC PMs
People could change messages of other people if the nick isn't registered.
This commit is contained in:
parent
ed1d49bf0c
commit
66d3f572f9
@ -395,7 +395,6 @@ cl_ev_send_priv_msg(ProfPrivateWin *privwin, const char *const msg, const char *
|
||||
|
||||
message_send_private(privwin->fulljid, plugin_msg, oob_url);
|
||||
chat_log_msg_out(jidp->barejid, plugin_msg, jidp->resourcepart);
|
||||
// TODO replace_id
|
||||
privwin_outgoing_msg(privwin, NULL, NULL, plugin_msg);
|
||||
|
||||
plugins_post_priv_message_send(privwin->fulljid, plugin_msg);
|
||||
|
@ -197,7 +197,6 @@ void mucwin_set_message_char(ProfMucWin *mucwin, const char *const ch);
|
||||
void mucwin_unset_message_char(ProfMucWin *mucwin);
|
||||
|
||||
// MUC private chat window
|
||||
// TODO repalce_id?
|
||||
void privwin_incoming_msg(ProfPrivateWin *privatewin, ProfMessage *message);
|
||||
void privwin_outgoing_msg(ProfPrivateWin *privwin, const char *const id, const char *const replace_id, const char *const message);
|
||||
void privwin_message_occupant_offline(ProfPrivateWin *privwin);
|
||||
|
@ -972,14 +972,6 @@ _private_chat_handler(xmpp_stanza_t *const stanza)
|
||||
message->id = strdup(id);
|
||||
}
|
||||
|
||||
xmpp_stanza_t *replace_id_stanza = xmpp_stanza_get_child_by_ns(stanza, STANZA_NS_LAST_MESSAGE_CORRECTION);
|
||||
if (replace_id_stanza) {
|
||||
const char *replace_id = xmpp_stanza_get_id(replace_id_stanza);
|
||||
if (replace_id) {
|
||||
message->replace_id = strdup(replace_id);
|
||||
}
|
||||
}
|
||||
|
||||
// check omemo encryption
|
||||
#ifdef HAVE_OMEMO
|
||||
message->plain = omemo_receive_message(stanza, &message->trusted);
|
||||
|
Loading…
Reference in New Issue
Block a user