Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-client-qt
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review 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-client-qt
Commits
78724c2a
Commit
78724c2a
authored
1 year ago
by
Sébastien Blin
Browse files
Options
Downloads
Patches
Plain Diff
call: clarify call messages if call fails
Change-Id: I0dca1ef919cb6f60e53c57c3a3ccf81c2333c231
parent
e14fbe94
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/libclient/api/interaction.h
+17
-5
17 additions, 5 deletions
src/libclient/api/interaction.h
src/libclient/authority/storagehelper.cpp
+0
-7
0 additions, 7 deletions
src/libclient/authority/storagehelper.cpp
with
17 additions
and
12 deletions
src/libclient/api/interaction.h
+
17
−
5
View file @
78724c2a
...
...
@@ -302,8 +302,18 @@ getFormattedCallDuration(const std::time_t duration)
* @return the formatted and translated call message string
*/
static
inline
QString
getCallInteractionStringNonSwarm
(
bool
isSelf
,
const
std
::
time_t
&
duration
)
getCallInteractionStringNonSwarm
(
bool
isSelf
,
const
std
::
time_t
&
duration
,
const
QString
&
reason
=
""
)
{
if
(
reason
==
"busy"
)
{
return
QObject
::
tr
(
"Missed call, peer is busy"
);
}
else
if
(
reason
==
"declined"
)
{
return
QObject
::
tr
(
"Missed call, peer declined"
);
}
else
if
(
reason
==
"no_device"
)
{
return
QObject
::
tr
(
"Missed call, peer offline"
);
}
if
(
duration
<
0
)
{
if
(
isSelf
)
{
return
QObject
::
tr
(
"Outgoing call"
);
...
...
@@ -467,16 +477,18 @@ struct Info
reactions
.
insert
(
i
.
key
(),
i
.
value
());
// Compute the status of the message.
// Basically, we got the status per member.
// We consider the message as sent if at least one member has received it or displayed if someone displayed it.
// We consider the message as sent if at least one member has received it or displayed if
// someone displayed it.
auto
maxStatus
=
0
;
status
=
Status
::
SENDING
;
for
(
const
auto
&
member
:
msg
.
status
.
keys
())
{
for
(
const
auto
&
member
:
msg
.
status
.
keys
())
{
if
(
member
==
accountUri
)
continue
;
auto
stValue
=
msg
.
status
.
value
(
member
);
if
(
stValue
>
maxStatus
)
{
maxStatus
=
stValue
;
status
=
maxStatus
<=
1
?
Status
::
SENDING
:
(
stValue
==
2
?
Status
::
SUCCESS
:
Status
::
DISPLAYED
);
status
=
maxStatus
<=
1
?
Status
::
SENDING
:
(
stValue
==
2
?
Status
::
SUCCESS
:
Status
::
DISPLAYED
);
}
if
(
maxStatus
==
3
)
break
;
...
...
@@ -498,7 +510,7 @@ getCallInteractionString(bool isSelf, const Info& info)
return
QObject
::
tr
(
"Join call"
);
}
}
return
getCallInteractionStringNonSwarm
(
isSelf
,
info
.
duration
);
return
getCallInteractionStringNonSwarm
(
isSelf
,
info
.
duration
,
info
.
commit
[
"reason"
]
);
}
static
inline
QString
...
...
This diff is collapsed.
Click to expand it.
src/libclient/authority/storagehelper.cpp
+
0
−
7
View file @
78724c2a
...
...
@@ -99,13 +99,6 @@ JSONFromString(const QString& str)
return
json
;
}
static
QString
JSONStringFromInitList
(
const
std
::
initializer_list
<
QPair
<
QString
,
QJsonValue
>>
args
)
{
QJsonObject
jsonObject
(
args
);
return
stringFromJSON
(
jsonObject
);
}
static
QString
readJSONValue
(
const
QJsonObject
&
json
,
const
QString
&
key
)
{
...
...
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