Commit 8c1f7104 authored by Benjamin REIS's avatar Benjamin REIS
Browse files

Fix linphone_chat_message_is_read in case im_notif_policy is changed

parent c4feeb97
......@@ -1538,8 +1538,8 @@ bool_t linphone_chat_message_is_read(LinphoneChatMessage *msg) {
LinphoneCore *lc = linphone_chat_room_get_core(cr);
LinphoneImNotifPolicy *policy = linphone_core_get_im_notif_policy(lc);
if ((linphone_im_notif_policy_get_recv_imdn_displayed(policy) == TRUE) && (msg->state == LinphoneChatMessageStateDisplayed)) return TRUE;
if ((linphone_im_notif_policy_get_recv_imdn_delivered(policy) == TRUE) && (msg->state == LinphoneChatMessageStateDeliveredToUser)) return TRUE;
return (msg->state == LinphoneChatMessageStateDelivered);
if ((linphone_im_notif_policy_get_recv_imdn_delivered(policy) == TRUE) && (msg->state == LinphoneChatMessageStateDeliveredToUser || msg->state == LinphoneChatMessageStateDisplayed)) return TRUE;
return (msg->state == LinphoneChatMessageStateDelivered || msg->state == LinphoneChatMessageStateDisplayed || msg->state == LinphoneChatMessageStateDeliveredToUser);
}
bool_t linphone_chat_message_is_outgoing(LinphoneChatMessage *msg) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment