Added roster list when using /roster with no args

This commit is contained in:
James Booth
2013-06-01 23:27:46 +01:00
parent 83c4177692
commit d49a01a9c3
5 changed files with 89 additions and 24 deletions

View File

@@ -153,6 +153,19 @@ presence_sub_request_find(char * search_str)
return autocomplete_complete(sub_requests_ac, search_str);
}
gboolean
presence_sub_request_exists(const char * const bare_jid)
{
GSList *requests = autocomplete_get_list(sub_requests_ac);
while (requests != NULL) {
if (strcmp(requests->data, bare_jid) == 0) {
return TRUE;
}
requests = g_slist_next(requests);
}
return FALSE;
}
void
presence_reset_sub_request_search(void)
{

View File

@@ -113,6 +113,7 @@ void presence_change_room_nick(const char * const room, const char * const nick)
void presence_leave_chat_room(const char * const room_jid);
void presence_update(resource_presence_t status, const char * const msg,
int idle);
gboolean presence_sub_request_exists(const char * const bare_jid);
// iq functions
void iq_send_software_version(const char * const fulljid);