Added pgp checks for message sending

This commit is contained in:
James Booth
2015-06-21 01:48:25 +01:00
parent 6617bb5a2b
commit e45afd5c09
9 changed files with 124 additions and 29 deletions

View File

@@ -42,7 +42,10 @@ char* otr_start_query(void)
void otr_poll(void) {}
void otr_on_connect(ProfAccount *account) {}
void otr_on_message_recv(const char * const barejid, const char * const resource, const char * const message) {}
void otr_on_message_send(ProfChatWin *chatwin, const char * const message) {}
gboolean otr_on_message_send(ProfChatWin *chatwin, const char * const message)
{
return FALSE;
}
void otr_keygen(ProfAccount *account)
{

View File

@@ -576,8 +576,8 @@ cmd_otr_start_sends_otr_query_message_to_current_recipeint(void **state)
will_return(otr_key_loaded, TRUE);
will_return(otr_start_query, query_message);
expect_string(message_send_chat_encrypted, barejid, recipient);
expect_string(message_send_chat_encrypted, msg, query_message);
expect_string(message_send_chat_otr, barejid, recipient);
expect_string(message_send_chat_otr, msg, query_message);
gboolean result = cmd_otr((ProfWin*)&chatwin, args, *help);
assert_true(result);

View File

@@ -65,13 +65,18 @@ char* message_send_chat(const char * const barejid, const char * const msg)
return NULL;
}
char* message_send_chat_encrypted(const char * const barejid, const char * const msg)
char* message_send_chat_otr(const char * const barejid, const char * const msg)
{
check_expected(barejid);
check_expected(msg);
return NULL;
}
char* message_send_chat_pgp(const char * const barejid, const char * const msg)
{
return NULL;
}
void message_send_private(const char * const fulljid, const char * const msg) {}
void message_send_groupchat(const char * const roomjid, const char * const msg) {}
void message_send_groupchat_subject(const char * const roomjid, const char * const subject) {}