diff options
author | James Booth <boothj5@gmail.com> | 2012-10-30 01:50:39 +0000 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2012-10-30 01:50:39 +0000 |
commit | bee708c9d253524d4af3a9d1599300722ff69044 (patch) | |
tree | e4bf627a576d531f25a8f278b6551033d8b7837c /src/chat_session.c | |
parent | d339004f55b4620b611a668b4fad0703999f8a54 (diff) | |
download | profani-tty-bee708c9d253524d4af3a9d1599300722ff69044.tar.gz |
Create chat session on send if none exists
Diffstat (limited to 'src/chat_session.c')
-rw-r--r-- | src/chat_session.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/chat_session.c b/src/chat_session.c index f352fea0..283860de 100644 --- a/src/chat_session.c +++ b/src/chat_session.c @@ -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) { |