aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTheJackiMonster <thejackimonster@gmail.com>2022-03-19 20:23:17 +0100
committerTheJackiMonster <thejackimonster@gmail.com>2022-03-19 20:23:17 +0100
commit2cb5059f0353f2dca0762a3eba714361a7e19a2e (patch)
tree61fdf3afbe6b29ea8044465e120d1b005cdd3600 /src
parentbe913f75546422d3e8e1c3b84d0ee66ae3e26602 (diff)
downloadmessenger-gtk-2cb5059f0353f2dca0762a3eba714361a7e19a2e.tar.gz
messenger-gtk-2cb5059f0353f2dca0762a3eba714361a7e19a2e.zip
Add sending read receipts depending on settings
Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/event.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/event.c b/src/event.c
index 0f71697..17a3a39 100644
--- a/src/event.c
+++ b/src/event.c
@@ -485,6 +485,11 @@ event_invitation(MESSENGER_Application *app,
485 if (!invitation) 485 if (!invitation)
486 return; 486 return;
487 487
488 const int sent = GNUNET_CHAT_message_is_sent(msg);
489
490 if ((GNUNET_YES != sent) && (app->settings.send_read_receipts))
491 GNUNET_CHAT_context_send_read_receipt(context, msg);
492
488 UI_MESSAGE_Handle *message = ui_message_new(app, UI_MESSAGE_STATUS); 493 UI_MESSAGE_Handle *message = ui_message_new(app, UI_MESSAGE_STATUS);
489 ui_message_update(message, app, msg); 494 ui_message_update(message, app, msg);
490 495
@@ -553,6 +558,9 @@ event_receive_message(MESSENGER_Application *app,
553 if ((text) && (!(*text))) 558 if ((text) && (!(*text)))
554 goto skip_message; 559 goto skip_message;
555 560
561 if ((GNUNET_YES != sent) && (app->settings.send_read_receipts))
562 GNUNET_CHAT_context_send_read_receipt(context, msg);
563
556 const UI_MESSAGE_Type type = ( 564 const UI_MESSAGE_Type type = (
557 GNUNET_YES == sent? UI_MESSAGE_SENT : UI_MESSAGE_DEFAULT 565 GNUNET_YES == sent? UI_MESSAGE_SENT : UI_MESSAGE_DEFAULT
558 ); 566 );