mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
Show message when no capabilities available
This commit is contained in:
parent
f04ed28886
commit
9f7a8cea81
@ -286,15 +286,15 @@ _cons_show_caps(const char * const fulljid, Resource *resource)
|
||||
{
|
||||
ProfWin *console = wins_get_console();
|
||||
cons_show("");
|
||||
|
||||
Capabilities *caps = caps_lookup(fulljid);
|
||||
if (caps) {
|
||||
const char *resource_presence = string_from_resource_presence(resource->presence);
|
||||
|
||||
int presence_colour = win_presence_colour(resource_presence);
|
||||
win_save_vprint(console, '-', NULL, NO_EOL, presence_colour, "", "%s", fulljid);
|
||||
win_save_print(console, '-', NULL, NO_DATE, 0, "", ":");
|
||||
|
||||
Capabilities *caps = caps_lookup(fulljid);
|
||||
|
||||
if (caps) {
|
||||
// show identity
|
||||
if ((caps->category != NULL) || (caps->type != NULL) || (caps->name != NULL)) {
|
||||
win_save_print(console, '-', NULL, NO_EOL, 0, "", "Identity: ");
|
||||
@ -342,6 +342,9 @@ _cons_show_caps(const char * const fulljid, Resource *resource)
|
||||
feature = g_slist_next(feature);
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
cons_show("No capabilities found for %s", fulljid);
|
||||
}
|
||||
|
||||
cons_alert();
|
||||
|
@ -199,9 +199,7 @@ caps_create_sha1_str(xmpp_stanza_t * const query)
|
||||
curr = g_slist_next(curr);
|
||||
}
|
||||
|
||||
log_debug("Generating capabilities hash for: %s", s->str);
|
||||
char *result = p_sha1_hash(s->str);
|
||||
log_debug("Hash: %s", result);
|
||||
|
||||
g_string_free(s, TRUE);
|
||||
g_slist_free_full(identities, g_free);
|
||||
|
Loading…
Reference in New Issue
Block a user