1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-09-22 19:45:54 -04:00

Remove subscription when reporting spam/abuse

When users receive a message and a subscription request from a new
contact, and they use `/blocked report-abse JID` or `/blocked
report-spam JID` they most likely want the subscription request to
vanish as well.

According to mdosch Conversations is behaving like this too.

Fix: https://github.com/profanity-im/profanity/issues/1970
This commit is contained in:
Michael Vetter 2024-05-31 11:20:06 +02:00
parent 57c8969de0
commit 694680d69e

View File

@ -3077,6 +3077,12 @@ cmd_blocked(ProfWin* window, const char* const command, gchar** args)
if (!res) {
cons_show("User %s already blocked.", args[1]);
}
// remove the subscription as well
if (presence_sub_request_exists(jid)) {
presence_subscription(jid, PRESENCE_UNSUBSCRIBED);
}
return TRUE;
}