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
e7e1ffb0
Commit
e7e1ffb0
authored
1 year ago
by
Sébastien Blin
Browse files
Options
Downloads
Patches
Plain Diff
misc: avoid unknown status
Change-Id: I87660a117c9f1c45c1066ddeb15c01e0e504b744
parent
651dbeb2
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/jamidht/conversation.cpp
+5
-1
5 additions, 1 deletion
src/jamidht/conversation.cpp
with
5 additions
and
1 deletion
src/jamidht/conversation.cpp
+
5
−
1
View file @
e7e1ffb0
...
...
@@ -1075,6 +1075,10 @@ Conversation::Impl::addToHistory(const std::vector<std::map<std::string, std::st
}
// Else we need to compute the status.
auto
&
cache
=
memberToStatus
[
member
.
uri
];
if
(
cache
==
0
)
{
// Message is sending, sent or displayed
cache
=
static_cast
<
int32_t
>
(
libjami
::
Account
::
MessageStates
::
SENDING
);
}
if
(
!
messageReceived
)
{
// For loading previous messages, there is 3 cases. Last value cached is displayed, so is every previous commits
// Else, if last value is sent, we can compare to the last read commit to update the cache
...
...
@@ -1083,7 +1087,7 @@ Conversation::Impl::addToHistory(const std::vector<std::map<std::string, std::st
if
(
messagesStatus_
[
member
.
uri
][
"read"
]
==
sharedCommit
->
id
)
{
cache
=
static_cast
<
int32_t
>
(
libjami
::
Account
::
MessageStates
::
DISPLAYED
);
}
}
else
if
(
cache
<
static_cast
<
int32_t
>
(
libjami
::
Account
::
MessageStates
::
SENDING
))
{
// SENDING or UNKNOWN
}
else
if
(
cache
<
=
static_cast
<
int32_t
>
(
libjami
::
Account
::
MessageStates
::
SENDING
))
{
// SENDING or UNKNOWN
if
(
messagesStatus_
[
member
.
uri
][
"fetched"
]
==
sharedCommit
->
id
)
{
cache
=
static_cast
<
int32_t
>
(
libjami
::
Account
::
MessageStates
::
SENT
);
}
...
...
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