1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-11-03 19:37:16 -05:00

Merge pull request #1166 from profanity-im/fix/1165-subscribed-msg

Don't print subscribed message if contact is already in roster
This commit is contained in:
Michael Vetter 2019-08-02 12:48:01 +02:00 committed by GitHub
commit 5d711639b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -863,9 +863,13 @@ sv_ev_subscription(const char *barejid, jabber_subscr_t type)
} }
break; break;
case PRESENCE_SUBSCRIBED: case PRESENCE_SUBSCRIBED:
cons_show("Subscription received from %s", barejid);
log_info("Subscription received from %s", barejid); log_info("Subscription received from %s", barejid);
cons_show("Subscription received from %s", barejid);
PContact contact = roster_get_contact(barejid);
if (contact == NULL) {
ui_print_system_msg_from_recipient(barejid, "Subscribed"); ui_print_system_msg_from_recipient(barejid, "Subscribed");
}
break; break;
case PRESENCE_UNSUBSCRIBED: case PRESENCE_UNSUBSCRIBED:
cons_show("%s deleted subscription", barejid); cons_show("%s deleted subscription", barejid);