Create chat session on send if none exists

This commit is contained in:
James Booth
2012-10-30 01:50:39 +00:00
parent d339004f55
commit bee708c9d2
3 changed files with 25 additions and 5 deletions

View File

@@ -52,6 +52,18 @@ chat_sessions_clear(void)
g_hash_table_remove_all(sessions);
}
gboolean
chat_session_exists(const char * const recipient)
{
ChatSession session = g_hash_table_lookup(sessions, recipient);
if (session != NULL) {
return TRUE;
} else {
return FALSE;
}
}
void
chat_session_start(const char * const recipient, gboolean recipient_supports)
{