Refactored chat session handling on sending message
This commit is contained in:
@@ -552,9 +552,7 @@ cmd_otr_start_sends_otr_query_message_to_current_recipeint(void **state)
|
||||
will_return(otr_start_query, query_message);
|
||||
|
||||
expect_string(message_send_chat, barejid, chatwin->barejid);
|
||||
expect_value(message_send_chat, resource, NULL);
|
||||
expect_string(message_send_chat, msg, query_message);
|
||||
expect_any(message_send_chat, send_state);
|
||||
|
||||
gboolean result = cmd_otr(args, *help);
|
||||
assert_true(result);
|
||||
|
||||
@@ -141,9 +141,10 @@ void handle_message_error_when_recipient_cancel_disables_chat_session(void **sta
|
||||
expect_any(ui_handle_recipient_not_found, err_msg);
|
||||
|
||||
handle_message_error(from, type, err_msg);
|
||||
gboolean chat_session_supported = chat_session_on_message_send(from);
|
||||
chat_session_on_message_send(from);
|
||||
gboolean send_states = chat_session_send_states(from);
|
||||
|
||||
assert_false(chat_session_supported);
|
||||
assert_false(send_states);
|
||||
chat_sessions_clear();
|
||||
}
|
||||
|
||||
|
||||
@@ -58,13 +58,10 @@ GList * jabber_get_available_resources(void)
|
||||
}
|
||||
|
||||
// message functions
|
||||
void message_send_chat(const char * const barejid, const char * const resource, const char * const msg,
|
||||
gboolean send_state)
|
||||
void message_send_chat(const char * const barejid, const char * const msg)
|
||||
{
|
||||
check_expected(barejid);
|
||||
check_expected(resource);
|
||||
check_expected(msg);
|
||||
check_expected(send_state);
|
||||
}
|
||||
|
||||
void message_send_private(const char * const fulljid, const char * const msg) {}
|
||||
@@ -218,4 +215,4 @@ void roster_send_add_new(const char * const barejid, const char * const name)
|
||||
void roster_send_remove(const char * const barejid)
|
||||
{
|
||||
check_expected(barejid);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user