Refactored parsing caps

This commit is contained in:
James Booth
2014-11-26 21:59:36 +00:00
parent 508bfeb2bf
commit e263e00a85
8 changed files with 111 additions and 99 deletions

View File

@@ -176,3 +176,17 @@ get_nick_from_full_jid(const char * const full_room_jid)
return nick_part;
}
/*
* get the fulljid, fall back to the barejid
*/
char *
jid_fulljid_or_barejid(Jid *jid)
{
if (jid->fulljid) {
return jid->fulljid;
} else {
return jid->barejid;
}
}