0
1
mirror of https://github.com/profanity-im/profanity.git synced 2025-07-26 12:14:28 -04:00

Moved stophe references in message send

This commit is contained in:
James Booth 2013-06-20 17:41:44 +01:00
parent 96496ca219
commit b9fc61fd30

View File

@ -68,8 +68,6 @@ message_send(const char * const msg, const char * const recipient)
jid = 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 (prefs_get_boolean(PREF_STATES)) {
if (!chat_session_exists(jid)) { if (!chat_session_exists(jid)) {
chat_session_start(jid, TRUE); chat_session_start(jid, TRUE);
@ -77,6 +75,8 @@ message_send(const char * const msg, const char * const recipient)
} }
xmpp_stanza_t *message; 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)) { if (prefs_get_boolean(PREF_STATES) && chat_session_get_recipient_supports(jid)) {
chat_session_set_active(jid); chat_session_set_active(jid);
message = stanza_create_message(ctx, jid, STANZA_TYPE_CHAT, message = stanza_create_message(ctx, jid, STANZA_TYPE_CHAT,