about summary refs log tree commit diff stats
path: root/tests/unittests
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2016-08-18 22:51:06 +0100
committerJames Booth <boothj5@gmail.com>2016-08-18 22:53:23 +0100
commita978bb12bf0235be9e57e0e08b6328acc88add8b (patch)
treef5245c813a82bcbcf5d403ceed2c9ec189abc3e0 /tests/unittests
parent71dcb2e427ec3e7e15f2131f18d64b84fc6230f8 (diff)
downloadprofani-tty-a978bb12bf0235be9e57e0e08b6328acc88add8b.tar.gz
Send receipt request only when receiver supports feature
issue #829
Diffstat (limited to 'tests/unittests')
-rw-r--r--tests/unittests/otr/stub_otr.c2
-rw-r--r--tests/unittests/ui/stub_ui.c3
-rw-r--r--tests/unittests/xmpp/stub_xmpp.c11
3 files changed, 11 insertions, 5 deletions
diff --git a/tests/unittests/otr/stub_otr.c b/tests/unittests/otr/stub_otr.c
index 098484d5..5070a66c 100644
--- a/tests/unittests/otr/stub_otr.c
+++ b/tests/unittests/otr/stub_otr.c
@@ -45,7 +45,7 @@ char* otr_on_message_recv(const char * const barejid, const char * const resourc
 {
     return NULL;
 }
-gboolean otr_on_message_send(ProfChatWin *chatwin, const char * const message)
+gboolean otr_on_message_send(ProfChatWin *chatwin, const char * const message, gboolean request_receipt)
 {
     return FALSE;
 }
diff --git a/tests/unittests/ui/stub_ui.c b/tests/unittests/ui/stub_ui.c
index 2f9c3bdb..928000a3 100644
--- a/tests/unittests/ui/stub_ui.c
+++ b/tests/unittests/ui/stub_ui.c
@@ -164,7 +164,8 @@ void privwin_incoming_msg(ProfPrivateWin *privatewin, const char * const message
 void ui_disconnected(void) {}
 void chatwin_recipient_gone(ProfChatWin *chatwin) {}
 
-void chatwin_outgoing_msg(ProfChatWin *chatwin, const char * const message, char *id, prof_enc_t enc_mode) {}
+void chatwin_outgoing_msg(ProfChatWin *chatwin, const char * const message, char *id, prof_enc_t enc_mode,
+    gboolean request_receipt) {}
 void chatwin_outgoing_carbon(ProfChatWin *chatwin, const char * const message, prof_enc_t enc_mode) {}
 void privwin_outgoing_msg(ProfPrivateWin *privwin, const char * const message) {}
 
diff --git a/tests/unittests/xmpp/stub_xmpp.c b/tests/unittests/xmpp/stub_xmpp.c
index e77afdcd..c474e82a 100644
--- a/tests/unittests/xmpp/stub_xmpp.c
+++ b/tests/unittests/xmpp/stub_xmpp.c
@@ -91,21 +91,22 @@ connection_supports(const char *const feature)
 }
 
 // message functions
-char* message_send_chat(const char * const barejid, const char * const msg, const char *const oob_url)
+char* message_send_chat(const char * const barejid, const char * const msg, const char *const oob_url,
+    gboolean request_receipt)
 {
     check_expected(barejid);
     check_expected(msg);
     return NULL;
 }
 
-char* message_send_chat_otr(const char * const barejid, const char * const msg)
+char* message_send_chat_otr(const char * const barejid, const char * const msg, gboolean request_receipt)
 {
     check_expected(barejid);
     check_expected(msg);
     return NULL;
 }
 
-char* message_send_chat_pgp(const char * const barejid, const char * const msg)
+char* message_send_chat_pgp(const char * const barejid, const char * const msg, gboolean request_receipt)
 {
     return NULL;
 }
@@ -213,6 +214,10 @@ EntityCapabilities* caps_lookup(const char * const jid)
 void caps_close(void) {}
 void caps_destroy(EntityCapabilities *caps) {}
 void caps_reset_ver(void) {}
+gboolean caps_jid_has_feature(const char *const jid, const char *const feature)
+{
+    return FALSE;
+}
 
 gboolean bookmark_add(const char *jid, const char *nick, const char *password, const char *autojoin_str)
 {