fix: Only allow /msg with valid JIDs

Only allow to message someone who has a nick in roster or when we pass a
user JID.
Otherwise notify the user.
This commit is contained in:
Michael Vetter
2026-03-06 12:36:53 +01:00
parent 5bcf859e92
commit d6705362a2

View File

@@ -2155,7 +2155,11 @@ cmd_msg(ProfWin* window, const char* const command, gchar** args)
barejid = usr;
}
_cmd_msg_chatwin(barejid, msg);
if (jid_is_valid_user_jid(barejid)) {
_cmd_msg_chatwin(barejid, msg);
} else {
cons_show_error("Not a contact or valid JID: %s", barejid);
}
return TRUE;
}