Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
liblinphone
Commits
b20343c4
Commit
b20343c4
authored
Feb 14, 2017
by
Ghislain MARY
Browse files
Fix linphone_chat_message_is_read() according to IM notif policy.
parent
b95a9b8c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
coreapi/chat.c
coreapi/chat.c
+6
-2
No files found.
coreapi/chat.c
View file @
b20343c4
...
...
@@ -1534,8 +1534,12 @@ void linphone_chat_message_remove_custom_header(LinphoneChatMessage *msg, const
}
bool_t
linphone_chat_message_is_read
(
LinphoneChatMessage
*
msg
)
{
// TODO : Only state == displayed when reception accused supported
return
(
msg
->
state
==
LinphoneChatMessageStateDisplayed
||
msg
->
state
==
LinphoneChatMessageStateDelivered
)
?
TRUE
:
FALSE
;
LinphoneChatRoom
*
cr
=
linphone_chat_message_get_chat_room
(
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
);
}
bool_t
linphone_chat_message_is_outgoing
(
LinphoneChatMessage
*
msg
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment