diff options
author | Michael Vetter <jubalh@iodoru.org> | 2020-02-12 13:09:58 +0100 |
---|---|---|
committer | Michael Vetter <jubalh@iodoru.org> | 2020-02-14 10:17:00 +0100 |
commit | 66d3f572f979cc8a697192b3b3eecfc2d734d04c (patch) | |
tree | 20a236c053a2698a42f919ced51a4487cdd03128 /src | |
parent | ed1d49bf0c12328e687bac5641b522f6ee5075d9 (diff) | |
download | profani-tty-66d3f572f979cc8a697192b3b3eecfc2d734d04c.tar.gz |
xep-0308: Dont allow to correct MUC PMs
People could change messages of other people if the nick isn't registered.
Diffstat (limited to 'src')
-rw-r--r-- | src/event/client_events.c | 1 | ||||
-rw-r--r-- | src/ui/ui.h | 1 | ||||
-rw-r--r-- | src/xmpp/message.c | 8 |
3 files changed, 0 insertions, 10 deletions
diff --git a/src/event/client_events.c b/src/event/client_events.c index 10354a5f..d3f63455 100644 --- a/src/event/client_events.c +++ b/src/event/client_events.c @@ -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); diff --git a/src/ui/ui.h b/src/ui/ui.h index 6cafd13a..c1c2b6cf 100644 --- a/src/ui/ui.h +++ b/src/ui/ui.h @@ -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); diff --git a/src/xmpp/message.c b/src/xmpp/message.c index aa519755..1254120d 100644 --- a/src/xmpp/message.c +++ b/src/xmpp/message.c @@ -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); |