mirror of
https://github.com/profanity-im/profanity.git
synced 2024-09-22 19:45:54 -04:00
Handle subscription on otr message sends
This commit is contained in:
parent
fadad0aeba
commit
8f2c0a66bf
@ -53,10 +53,18 @@ cb_is_logged_in(void *opdata, const char *accountname,
|
||||
const char *protocol, const char *recipient)
|
||||
{
|
||||
PContact contact = roster_get_contact(recipient);
|
||||
|
||||
// not in roster
|
||||
if (contact == NULL) {
|
||||
return PRESENCE_ONLINE;
|
||||
}
|
||||
|
||||
// no subsribed
|
||||
if (p_contact_subscribed(contact) == FALSE) {
|
||||
return PRESENCE_ONLINE;
|
||||
}
|
||||
|
||||
// subscribed
|
||||
if (g_strcmp0(p_contact_presence(contact), "offline") == 0) {
|
||||
return PRESENCE_OFFLINE;
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user