1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-06-23 21:45:30 +00:00

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
This commit is contained in:
Michael Vetter 2020-02-13 12:21:22 +01:00
parent 3e901aee99
commit 3aad0523d7

View File

@ -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) {