mirror of
https://github.com/profanity-im/profanity.git
synced 2024-11-03 19:37:16 -05:00
Fixed invalid resource error
This commit is contained in:
parent
893242d361
commit
657d1d4a49
@ -1918,9 +1918,17 @@ _cmd_caps(gchar **args, struct cmd_help_t help)
|
||||
cons_show("You must provide a full jid to the /caps command.");
|
||||
} else {
|
||||
PContact pcontact = contact_list_get_contact(jid->barejid);
|
||||
if (pcontact == NULL) {
|
||||
cons_show("Contact not found in roster: %s", jid->barejid);
|
||||
} else {
|
||||
Resource *resource = p_contact_get_resource(pcontact, jid->resourcepart);
|
||||
if (resource == NULL) {
|
||||
cons_show("Could not find resource %s, for contact %s", jid->barejid, jid->resourcepart);
|
||||
} else {
|
||||
cons_show_caps(jid->fulljid, resource);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
cons_show("You must provide a jid to the /caps command.");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user