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

Use caps_lookup when checking for feature

This commit is contained in:
James Booth 2016-09-25 22:57:43 +01:00
parent f683a704ad
commit 9796b23cfd

View File

@ -310,8 +310,7 @@ caps_lookup(const char *const jid)
gboolean gboolean
caps_jid_has_feature(const char *const jid, const char *const feature) caps_jid_has_feature(const char *const jid, const char *const feature)
{ {
char *ver = g_hash_table_lookup(jid_to_ver, jid); EntityCapabilities *caps = caps_lookup(jid);
EntityCapabilities *caps = ver ? _caps_by_ver(ver) : _caps_by_jid(jid);
if (caps == NULL) { if (caps == NULL) {
return FALSE; return FALSE;