Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liblinphone
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
10
Issues
10
List
Board
Labels
Milestones
Merge Requests
22
Merge Requests
22
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
External Wiki
External Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
BC
public
liblinphone
Commits
735268f8
Commit
735268f8
authored
Jun 20, 2017
by
Ghislain MARY
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix last received chat message not being marked as read.
parent
8517a2d0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
0 deletions
+11
-0
chat.c
coreapi/chat.c
+6
-0
message_storage.c
coreapi/message_storage.c
+5
-0
No files found.
coreapi/chat.c
View file @
735268f8
...
...
@@ -750,6 +750,10 @@ LinphoneReason linphone_core_message_received(LinphoneCore *lc, SalOp *op, const
cr
->
unread_count
=
1
;
else
cr
->
unread_count
++
;
/* Mark the message as pending so that if linphone_core_chat_room_mark_as_read() is called
in the linphone_chat_room_message_received() callback, it will effectively be marked as
being read before being stored. */
cr
->
pending_message
=
msg
;
}
linphone_chat_room_message_received
(
cr
,
lc
,
msg
);
...
...
@@ -758,6 +762,8 @@ LinphoneReason linphone_core_message_received(LinphoneCore *lc, SalOp *op, const
msg
->
storage_id
=
linphone_chat_message_store
(
msg
);
}
cr
->
pending_message
=
NULL
;
end
:
linphone_address_unref
(
addr
);
if
(
msg
!=
NULL
)
linphone_chat_message_unref
(
msg
);
...
...
coreapi/message_storage.c
View file @
735268f8
...
...
@@ -456,6 +456,11 @@ void linphone_chat_room_mark_as_read(LinphoneChatRoom *cr){
sqlite3_free
(
buf
);
ms_free
(
peer
);
if
(
cr
->
pending_message
)
{
linphone_chat_message_set_state
(
cr
->
pending_message
,
LinphoneChatMessageStateDisplayed
);
linphone_chat_message_send_display_notification
(
cr
->
pending_message
);
}
cr
->
unread_count
=
0
;
}
...
...
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