Add pre chat and room message blocking

This commit is contained in:
James Booth
2017-01-22 18:08:29 +00:00
parent 7090f85d85
commit 83385cdbc0
9 changed files with 85 additions and 21 deletions

View File

@@ -136,6 +136,9 @@ cl_ev_send_msg(ProfChatWin *chatwin, const char *const msg, const char *const oo
}
char *plugin_msg = plugins_pre_chat_message_send(chatwin->barejid, msg);
if (plugin_msg == NULL) {
return;
}
// OTR suported, PGP supported
#ifdef HAVE_LIBOTR
@@ -218,6 +221,9 @@ void
cl_ev_send_muc_msg(ProfMucWin *mucwin, const char *const msg, const char *const oob_url)
{
char *plugin_msg = plugins_pre_room_message_send(mucwin->roomjid, msg);
if (plugin_msg == NULL) {
return;
}
message_send_groupchat(mucwin->roomjid, plugin_msg, oob_url);