From 3aad0523d786ade3be55d3ec1b10ebacc4471bd7 Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Thu, 13 Feb 2020 12:21:22 +0100 Subject: 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 --- src/event/client_events.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'src/event/client_events.c') 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) { -- cgit 1.4.1-2-gfad0