Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-daemon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-daemon
Commits
7b454ff6
Commit
7b454ff6
authored
1 year ago
by
Adrien Béraud
Browse files
Options
Downloads
Patches
Plain Diff
MessageEngine: reset message status on content replace
Change-Id: I62720173f91c1e32be9428485449cbcc7b388c9a
parent
7463a8a2
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/im/message_engine.cpp
+3
-1
3 additions, 1 deletion
src/im/message_engine.cpp
with
3 additions
and
1 deletion
src/im/message_engine.cpp
+
3
−
1
View file @
7b454ff6
...
...
@@ -60,6 +60,7 @@ MessageEngine::sendMessage(const std::string& to,
token
=
refreshToken
;
previousIt
->
second
.
to
=
to
;
previousIt
->
second
.
payloads
=
payloads
;
previousIt
->
second
.
status
=
MessageStatus
::
IDLE
;
}
else
{
do
{
token
=
std
::
uniform_int_distribution
<
MessageToken
>
{
1
,
JAMI_ID_MAX_VAL
}(
...
...
@@ -95,6 +96,7 @@ MessageEngine::retrySend(const std::string& peer, bool retryOnTimeout, const std
std
::
map
<
std
::
string
,
std
::
string
>
payloads
;
};
std
::
vector
<
PendingMsg
>
pending
{};
auto
now
=
clock
::
now
();
{
std
::
lock_guard
lock
(
messagesMutex_
);
...
...
@@ -109,7 +111,7 @@ MessageEngine::retrySend(const std::string& peer, bool retryOnTimeout, const std
||
m
->
second
.
status
==
MessageStatus
::
IDLE
)
{
m
->
second
.
status
=
MessageStatus
::
SENDING
;
m
->
second
.
retried
++
;
m
->
second
.
last_op
=
clock
::
now
()
;
m
->
second
.
last_op
=
now
;
pending
.
emplace_back
(
PendingMsg
{
m
->
first
,
m
->
second
.
to
,
m
->
second
.
payloads
});
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment