about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2013-06-20 17:41:44 +0100
committerJames Booth <boothj5@gmail.com>2013-06-20 17:41:44 +0100
commitb9fc61fd3087ad723d8d76bb24b2cd0d444bd6b1 (patch)
tree669109e5535bde79a87f7fc973ea9f96365434a8
parent96496ca21933ebcc21e0f28b6947dba084fa6c56 (diff)
downloadprofani-tty-b9fc61fd3087ad723d8d76bb24b2cd0d444bd6b1.tar.gz
Moved stophe references in message send
-rw-r--r--src/xmpp/message.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/xmpp/message.c b/src/xmpp/message.c
index 1111d6f5..29d11958 100644
--- a/src/xmpp/message.c
+++ b/src/xmpp/message.c
@@ -68,8 +68,6 @@ message_send(const char * const msg, const char * const recipient)
         jid = recipient;
     }
 
-    xmpp_conn_t * const conn = connection_get_conn();
-    xmpp_ctx_t * const ctx = connection_get_ctx();
     if (prefs_get_boolean(PREF_STATES)) {
         if (!chat_session_exists(jid)) {
             chat_session_start(jid, TRUE);
@@ -77,6 +75,8 @@ message_send(const char * const msg, const char * const recipient)
     }
 
     xmpp_stanza_t *message;
+    xmpp_conn_t * const conn = connection_get_conn();
+    xmpp_ctx_t * const ctx = connection_get_ctx();
     if (prefs_get_boolean(PREF_STATES) && chat_session_get_recipient_supports(jid)) {
         chat_session_set_active(jid);
         message = stanza_create_message(ctx, jid, STANZA_TYPE_CHAT,