about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2020-02-13 12:21:22 +0100
committerMichael Vetter <jubalh@iodoru.org>2020-02-14 10:17:07 +0100
commit3aad0523d786ade3be55d3ec1b10ebacc4471bd7 (patch)
tree92bf681ad111cadaf1cf6fe28cbaf303284b95eb /src
parent3e901aee996c702c3be063fd155c4be951db5d53 (diff)
downloadprofani-tty-3aad0523d786ade3be55d3ec1b10ebacc4471bd7.tar.gz
Always send delivery receipts if enabled
So far receipts are only send if we have enabled it and the other client
supports it.
But it could be that the other person is connected with several clients.
One supporting it and the other which doesn't. If the not supporting one
is active and we send to a fulljid, then we won't get receipts.

Probably it's best to just always send them if they are enabled in
Profanity. And not try to find out the capabilities of the other client.

Fix https://github.com/profanity-im/profanity/issues/1268
Diffstat (limited to 'src')
-rw-r--r--src/event/client_events.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/src/event/client_events.c b/src/event/client_events.c
index 747dcfa6..e0ea85d7 100644
--- a/src/event/client_events.c
+++ b/src/event/client_events.c
@@ -119,20 +119,7 @@ cl_ev_send_msg_correct(ProfChatWin *chatwin, const char *const msg, const char *
 {
     chat_state_active(chatwin->state);
 
-    gboolean request_receipt = FALSE;
-    if (prefs_get_boolean(PREF_RECEIPTS_REQUEST)) {
-        char *session_jid = chat_session_get_jid(chatwin->barejid);
-        if (session_jid) {
-            Jid *session_jidp = jid_create(session_jid);
-            if (session_jidp && session_jidp->resourcepart) {
-                if (caps_jid_has_feature(session_jid, XMPP_FEATURE_RECEIPTS)) {
-                    request_receipt = TRUE;
-                }
-            }
-            jid_destroy(session_jidp);
-            free(session_jid);
-        }
-    }
+    gboolean request_receipt = prefs_get_boolean(PREF_RECEIPTS_REQUEST);
 
     char *plugin_msg = plugins_pre_chat_message_send(chatwin->barejid, msg);
     if (plugin_msg == NULL) {