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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-client-qt
Commits
69f7ef19
Commit
69f7ef19
authored
Nov 19, 2021
by
Aline Gondim Santos
Browse files
Options
Downloads
Patches
Plain Diff
calls: fix wrong reference to convId
Change-Id: If0073e9b3156bbebfafb9725e3f521b558635f62
parent
0a7aaa59
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/calladapter.cpp
+46
-23
46 additions, 23 deletions
src/calladapter.cpp
src/calladapter.h
+0
-1
0 additions, 1 deletion
src/calladapter.h
with
46 additions
and
24 deletions
src/calladapter.cpp
+
46
−
23
View file @
69f7ef19
...
@@ -275,7 +275,8 @@ CallAdapter::onRemoteRecordingChanged(const QString& callId,
...
@@ -275,7 +275,8 @@ CallAdapter::onRemoteRecordingChanged(const QString& callId,
{
{
Q_UNUSED
(
peerRec
)
Q_UNUSED
(
peerRec
)
Q_UNUSED
(
state
)
Q_UNUSED
(
state
)
const
auto
currentCallId
=
lrcInstance_
->
getCallIdForConversationUid
(
convUid_
,
accountId_
);
const
auto
currentCallId
=
lrcInstance_
->
getCallIdForConversationUid
(
lrcInstance_
->
get_selectedConvUid
(),
accountId_
);
if
(
callId
==
currentCallId
)
if
(
callId
==
currentCallId
)
updateRecordingPeers
();
updateRecordingPeers
();
}
}
...
@@ -432,10 +433,12 @@ CallAdapter::onShowCallView(const QString& accountId, const QString& convUid)
...
@@ -432,10 +433,12 @@ CallAdapter::onShowCallView(const QString& accountId, const QString& convUid)
void
void
CallAdapter
::
updateCall
(
const
QString
&
convUid
,
const
QString
&
accountId
,
bool
forceCallOnly
)
CallAdapter
::
updateCall
(
const
QString
&
convUid
,
const
QString
&
accountId
,
bool
forceCallOnly
)
{
{
if
(
convUid
!=
lrcInstance_
->
get_selectedConvUid
())
return
;
accountId_
=
accountId
.
isEmpty
()
?
accountId_
:
accountId
;
accountId_
=
accountId
.
isEmpty
()
?
accountId_
:
accountId
;
convUid_
=
convUid
.
isEmpty
()
?
convUid_
:
convUid
;
const
auto
&
convInfo
=
lrcInstance_
->
getConversationFromConvUid
(
convUid_
);
const
auto
&
convInfo
=
lrcInstance_
->
getConversationFromConvUid
(
lrcInstance_
->
get_selectedConvUid
());
if
(
convInfo
.
uid
.
isEmpty
())
{
if
(
convInfo
.
uid
.
isEmpty
())
{
return
;
return
;
}
}
...
@@ -461,7 +464,8 @@ bool
...
@@ -461,7 +464,8 @@ bool
CallAdapter
::
shouldShowPreview
(
bool
force
)
CallAdapter
::
shouldShowPreview
(
bool
force
)
{
{
bool
shouldShowPreview
{
false
};
bool
shouldShowPreview
{
false
};
const
auto
&
convInfo
=
lrcInstance_
->
getConversationFromConvUid
(
convUid_
);
const
auto
&
convInfo
=
lrcInstance_
->
getConversationFromConvUid
(
lrcInstance_
->
get_selectedConvUid
());
if
(
convInfo
.
uid
.
isEmpty
())
{
if
(
convInfo
.
uid
.
isEmpty
())
{
return
shouldShowPreview
;
return
shouldShowPreview
;
...
@@ -511,7 +515,8 @@ QVariantList
...
@@ -511,7 +515,8 @@ QVariantList
CallAdapter
::
getConferencesInfos
()
CallAdapter
::
getConferencesInfos
()
{
{
QVariantList
map
;
QVariantList
map
;
const
auto
&
convInfo
=
lrcInstance_
->
getConversationFromConvUid
(
convUid_
);
const
auto
&
convInfo
=
lrcInstance_
->
getConversationFromConvUid
(
lrcInstance_
->
get_selectedConvUid
());
if
(
convInfo
.
uid
.
isEmpty
())
if
(
convInfo
.
uid
.
isEmpty
())
return
map
;
return
map
;
auto
callId
=
convInfo
.
confId
.
isEmpty
()
?
convInfo
.
callId
:
convInfo
.
confId
;
auto
callId
=
convInfo
.
confId
.
isEmpty
()
?
convInfo
.
callId
:
convInfo
.
confId
;
...
@@ -601,7 +606,8 @@ CallAdapter::connectCallModel(const QString& accountId)
...
@@ -601,7 +606,8 @@ CallAdapter::connectCallModel(const QString& accountId)
void
void
CallAdapter
::
updateRecordingPeers
(
bool
eraseLabelOnEmpty
)
CallAdapter
::
updateRecordingPeers
(
bool
eraseLabelOnEmpty
)
{
{
const
auto
&
convInfo
=
lrcInstance_
->
getConversationFromConvUid
(
convUid_
);
const
auto
&
convInfo
=
lrcInstance_
->
getConversationFromConvUid
(
lrcInstance_
->
get_selectedConvUid
());
auto
*
call
=
lrcInstance_
->
getCallInfoForConversation
(
convInfo
);
auto
*
call
=
lrcInstance_
->
getCallInfoForConversation
(
convInfo
);
if
(
!
call
)
{
if
(
!
call
)
{
return
;
return
;
...
@@ -626,7 +632,8 @@ CallAdapter::updateRecordingPeers(bool eraseLabelOnEmpty)
...
@@ -626,7 +632,8 @@ CallAdapter::updateRecordingPeers(bool eraseLabelOnEmpty)
void
void
CallAdapter
::
sipInputPanelPlayDTMF
(
const
QString
&
key
)
CallAdapter
::
sipInputPanelPlayDTMF
(
const
QString
&
key
)
{
{
auto
callId
=
lrcInstance_
->
getCallIdForConversationUid
(
convUid_
,
accountId_
);
auto
callId
=
lrcInstance_
->
getCallIdForConversationUid
(
lrcInstance_
->
get_selectedConvUid
(),
accountId_
);
if
(
callId
.
isEmpty
()
||
!
lrcInstance_
->
getCurrentCallModel
()
->
hasCall
(
callId
))
{
if
(
callId
.
isEmpty
()
||
!
lrcInstance_
->
getCurrentCallModel
()
->
hasCall
(
callId
))
{
return
;
return
;
}
}
...
@@ -774,7 +781,8 @@ CallAdapter::showGridConferenceLayout()
...
@@ -774,7 +781,8 @@ CallAdapter::showGridConferenceLayout()
void
void
CallAdapter
::
hangUpThisCall
()
CallAdapter
::
hangUpThisCall
()
{
{
const
auto
&
convInfo
=
lrcInstance_
->
getConversationFromConvUid
(
convUid_
,
accountId_
);
const
auto
&
convInfo
=
lrcInstance_
->
getConversationFromConvUid
(
lrcInstance_
->
get_selectedConvUid
(),
accountId_
);
if
(
!
convInfo
.
uid
.
isEmpty
())
{
if
(
!
convInfo
.
uid
.
isEmpty
())
{
auto
*
callModel
=
lrcInstance_
->
getAccountInfo
(
accountId_
).
callModel
.
get
();
auto
*
callModel
=
lrcInstance_
->
getAccountInfo
(
accountId_
).
callModel
.
get
();
if
(
!
convInfo
.
confId
.
isEmpty
()
&&
callModel
->
hasCall
(
convInfo
.
confId
))
{
if
(
!
convInfo
.
confId
.
isEmpty
()
&&
callModel
->
hasCall
(
convInfo
.
confId
))
{
...
@@ -788,7 +796,8 @@ CallAdapter::hangUpThisCall()
...
@@ -788,7 +796,8 @@ CallAdapter::hangUpThisCall()
bool
bool
CallAdapter
::
isRecordingThisCall
()
CallAdapter
::
isRecordingThisCall
()
{
{
const
auto
&
convInfo
=
lrcInstance_
->
getConversationFromConvUid
(
convUid_
,
accountId_
);
const
auto
&
convInfo
=
lrcInstance_
->
getConversationFromConvUid
(
lrcInstance_
->
get_selectedConvUid
(),
accountId_
);
auto
&
accInfo
=
lrcInstance_
->
accountModel
().
getAccountInfo
(
accountId_
);
auto
&
accInfo
=
lrcInstance_
->
accountModel
().
getAccountInfo
(
accountId_
);
return
accInfo
.
callModel
->
isRecording
(
convInfo
.
confId
)
return
accInfo
.
callModel
->
isRecording
(
convInfo
.
confId
)
||
accInfo
.
callModel
->
isRecording
(
convInfo
.
callId
);
||
accInfo
.
callModel
->
isRecording
(
convInfo
.
callId
);
...
@@ -797,7 +806,8 @@ CallAdapter::isRecordingThisCall()
...
@@ -797,7 +806,8 @@ CallAdapter::isRecordingThisCall()
bool
bool
CallAdapter
::
isCurrentHost
()
const
CallAdapter
::
isCurrentHost
()
const
{
{
const
auto
&
convInfo
=
lrcInstance_
->
getConversationFromConvUid
(
convUid_
,
accountId_
);
const
auto
&
convInfo
=
lrcInstance_
->
getConversationFromConvUid
(
lrcInstance_
->
get_selectedConvUid
(),
accountId_
);
if
(
!
convInfo
.
uid
.
isEmpty
())
{
if
(
!
convInfo
.
uid
.
isEmpty
())
{
auto
*
callModel
=
lrcInstance_
->
getAccountInfo
(
accountId_
).
callModel
.
get
();
auto
*
callModel
=
lrcInstance_
->
getAccountInfo
(
accountId_
).
callModel
.
get
();
try
{
try
{
...
@@ -819,7 +829,8 @@ CallAdapter::isCurrentHost() const
...
@@ -819,7 +829,8 @@ CallAdapter::isCurrentHost() const
bool
bool
CallAdapter
::
participantIsHost
(
const
QString
&
uri
)
const
CallAdapter
::
participantIsHost
(
const
QString
&
uri
)
const
{
{
const
auto
&
convInfo
=
lrcInstance_
->
getConversationFromConvUid
(
convUid_
);
const
auto
&
convInfo
=
lrcInstance_
->
getConversationFromConvUid
(
lrcInstance_
->
get_selectedConvUid
());
if
(
!
convInfo
.
uid
.
isEmpty
())
{
if
(
!
convInfo
.
uid
.
isEmpty
())
{
auto
&
accInfo
=
lrcInstance_
->
getAccountInfo
(
accountId_
);
auto
&
accInfo
=
lrcInstance_
->
getAccountInfo
(
accountId_
);
auto
*
callModel
=
accInfo
.
callModel
.
get
();
auto
*
callModel
=
accInfo
.
callModel
.
get
();
...
@@ -841,7 +852,8 @@ bool
...
@@ -841,7 +852,8 @@ bool
CallAdapter
::
isModerator
(
const
QString
&
uri
)
const
CallAdapter
::
isModerator
(
const
QString
&
uri
)
const
{
{
auto
*
callModel
=
lrcInstance_
->
getAccountInfo
(
accountId_
).
callModel
.
get
();
auto
*
callModel
=
lrcInstance_
->
getAccountInfo
(
accountId_
).
callModel
.
get
();
const
auto
&
convInfo
=
lrcInstance_
->
getConversationFromConvUid
(
convUid_
);
const
auto
&
convInfo
=
lrcInstance_
->
getConversationFromConvUid
(
lrcInstance_
->
get_selectedConvUid
());
auto
confId
=
convInfo
.
confId
;
auto
confId
=
convInfo
.
confId
;
if
(
confId
.
isEmpty
())
if
(
confId
.
isEmpty
())
...
@@ -857,7 +869,8 @@ bool
...
@@ -857,7 +869,8 @@ bool
CallAdapter
::
isHandRaised
(
const
QString
&
uri
)
const
CallAdapter
::
isHandRaised
(
const
QString
&
uri
)
const
{
{
auto
*
callModel
=
lrcInstance_
->
getAccountInfo
(
accountId_
).
callModel
.
get
();
auto
*
callModel
=
lrcInstance_
->
getAccountInfo
(
accountId_
).
callModel
.
get
();
const
auto
&
convInfo
=
lrcInstance_
->
getConversationFromConvUid
(
convUid_
);
const
auto
&
convInfo
=
lrcInstance_
->
getConversationFromConvUid
(
lrcInstance_
->
get_selectedConvUid
());
auto
confId
=
convInfo
.
confId
;
auto
confId
=
convInfo
.
confId
;
if
(
confId
.
isEmpty
())
if
(
confId
.
isEmpty
())
...
@@ -869,7 +882,8 @@ void
...
@@ -869,7 +882,8 @@ void
CallAdapter
::
setHandRaised
(
const
QString
&
uri
,
bool
state
)
CallAdapter
::
setHandRaised
(
const
QString
&
uri
,
bool
state
)
{
{
auto
*
callModel
=
lrcInstance_
->
getAccountInfo
(
accountId_
).
callModel
.
get
();
auto
*
callModel
=
lrcInstance_
->
getAccountInfo
(
accountId_
).
callModel
.
get
();
const
auto
&
convInfo
=
lrcInstance_
->
getConversationFromConvUid
(
convUid_
);
const
auto
&
convInfo
=
lrcInstance_
->
getConversationFromConvUid
(
lrcInstance_
->
get_selectedConvUid
());
auto
confId
=
convInfo
.
confId
;
auto
confId
=
convInfo
.
confId
;
if
(
confId
.
isEmpty
())
if
(
confId
.
isEmpty
())
confId
=
convInfo
.
callId
;
confId
=
convInfo
.
callId
;
...
@@ -882,7 +896,8 @@ CallAdapter::setHandRaised(const QString& uri, bool state)
...
@@ -882,7 +896,8 @@ CallAdapter::setHandRaised(const QString& uri, bool state)
bool
bool
CallAdapter
::
isCurrentModerator
()
const
CallAdapter
::
isCurrentModerator
()
const
{
{
const
auto
&
convInfo
=
lrcInstance_
->
getConversationFromConvUid
(
convUid_
);
const
auto
&
convInfo
=
lrcInstance_
->
getConversationFromConvUid
(
lrcInstance_
->
get_selectedConvUid
());
if
(
!
convInfo
.
uid
.
isEmpty
())
{
if
(
!
convInfo
.
uid
.
isEmpty
())
{
auto
*
callModel
=
lrcInstance_
->
getAccountInfo
(
accountId_
).
callModel
.
get
();
auto
*
callModel
=
lrcInstance_
->
getAccountInfo
(
accountId_
).
callModel
.
get
();
try
{
try
{
...
@@ -907,7 +922,8 @@ void
...
@@ -907,7 +922,8 @@ void
CallAdapter
::
setModerator
(
const
QString
&
uri
,
const
bool
state
)
CallAdapter
::
setModerator
(
const
QString
&
uri
,
const
bool
state
)
{
{
auto
*
callModel
=
lrcInstance_
->
getAccountInfo
(
accountId_
).
callModel
.
get
();
auto
*
callModel
=
lrcInstance_
->
getAccountInfo
(
accountId_
).
callModel
.
get
();
const
auto
&
convInfo
=
lrcInstance_
->
getConversationFromConvUid
(
convUid_
);
const
auto
&
convInfo
=
lrcInstance_
->
getConversationFromConvUid
(
lrcInstance_
->
get_selectedConvUid
());
auto
confId
=
convInfo
.
confId
;
auto
confId
=
convInfo
.
confId
;
if
(
confId
.
isEmpty
())
if
(
confId
.
isEmpty
())
confId
=
convInfo
.
callId
;
confId
=
convInfo
.
callId
;
...
@@ -921,7 +937,8 @@ void
...
@@ -921,7 +937,8 @@ void
CallAdapter
::
muteParticipant
(
const
QString
&
uri
,
const
bool
state
)
CallAdapter
::
muteParticipant
(
const
QString
&
uri
,
const
bool
state
)
{
{
auto
*
callModel
=
lrcInstance_
->
getAccountInfo
(
accountId_
).
callModel
.
get
();
auto
*
callModel
=
lrcInstance_
->
getAccountInfo
(
accountId_
).
callModel
.
get
();
const
auto
&
convInfo
=
lrcInstance_
->
getConversationFromConvUid
(
convUid_
);
const
auto
&
convInfo
=
lrcInstance_
->
getConversationFromConvUid
(
lrcInstance_
->
get_selectedConvUid
());
auto
confId
=
convInfo
.
confId
;
auto
confId
=
convInfo
.
confId
;
if
(
confId
.
isEmpty
())
if
(
confId
.
isEmpty
())
...
@@ -936,7 +953,8 @@ CallAdapter::muteParticipant(const QString& uri, const bool state)
...
@@ -936,7 +953,8 @@ CallAdapter::muteParticipant(const QString& uri, const bool state)
CallAdapter
::
MuteStates
CallAdapter
::
MuteStates
CallAdapter
::
getMuteState
(
const
QString
&
uri
)
const
CallAdapter
::
getMuteState
(
const
QString
&
uri
)
const
{
{
const
auto
&
convInfo
=
lrcInstance_
->
getConversationFromConvUid
(
convUid_
);
const
auto
&
convInfo
=
lrcInstance_
->
getConversationFromConvUid
(
lrcInstance_
->
get_selectedConvUid
());
auto
*
callModel
=
lrcInstance_
->
getAccountInfo
(
accountId_
).
callModel
.
get
();
auto
*
callModel
=
lrcInstance_
->
getAccountInfo
(
accountId_
).
callModel
.
get
();
auto
confId
=
convInfo
.
confId
.
isEmpty
()
?
convInfo
.
callId
:
convInfo
.
confId
;
auto
confId
=
convInfo
.
confId
.
isEmpty
()
?
convInfo
.
callId
:
convInfo
.
confId
;
try
{
try
{
...
@@ -969,7 +987,8 @@ void
...
@@ -969,7 +987,8 @@ void
CallAdapter
::
hangupParticipant
(
const
QString
&
uri
)
CallAdapter
::
hangupParticipant
(
const
QString
&
uri
)
{
{
auto
*
callModel
=
lrcInstance_
->
getAccountInfo
(
accountId_
).
callModel
.
get
();
auto
*
callModel
=
lrcInstance_
->
getAccountInfo
(
accountId_
).
callModel
.
get
();
const
auto
&
convInfo
=
lrcInstance_
->
getConversationFromConvUid
(
convUid_
);
const
auto
&
convInfo
=
lrcInstance_
->
getConversationFromConvUid
(
lrcInstance_
->
get_selectedConvUid
());
auto
confId
=
convInfo
.
confId
;
auto
confId
=
convInfo
.
confId
;
if
(
confId
.
isEmpty
())
if
(
confId
.
isEmpty
())
...
@@ -984,7 +1003,8 @@ CallAdapter::hangupParticipant(const QString& uri)
...
@@ -984,7 +1003,8 @@ CallAdapter::hangupParticipant(const QString& uri)
void
void
CallAdapter
::
holdThisCallToggle
()
CallAdapter
::
holdThisCallToggle
()
{
{
const
auto
callId
=
lrcInstance_
->
getCallIdForConversationUid
(
convUid_
,
accountId_
);
const
auto
callId
=
lrcInstance_
->
getCallIdForConversationUid
(
lrcInstance_
->
get_selectedConvUid
(),
accountId_
);
if
(
callId
.
isEmpty
()
||
!
lrcInstance_
->
getCurrentCallModel
()
->
hasCall
(
callId
))
{
if
(
callId
.
isEmpty
()
||
!
lrcInstance_
->
getCurrentCallModel
()
->
hasCall
(
callId
))
{
return
;
return
;
}
}
...
@@ -998,7 +1018,8 @@ CallAdapter::holdThisCallToggle()
...
@@ -998,7 +1018,8 @@ CallAdapter::holdThisCallToggle()
void
void
CallAdapter
::
muteThisCallToggle
(
bool
mute
)
CallAdapter
::
muteThisCallToggle
(
bool
mute
)
{
{
const
auto
callId
=
lrcInstance_
->
getCallIdForConversationUid
(
convUid_
,
accountId_
);
const
auto
callId
=
lrcInstance_
->
getCallIdForConversationUid
(
lrcInstance_
->
get_selectedConvUid
(),
accountId_
);
if
(
callId
.
isEmpty
()
||
!
lrcInstance_
->
getCurrentCallModel
()
->
hasCall
(
callId
))
{
if
(
callId
.
isEmpty
()
||
!
lrcInstance_
->
getCurrentCallModel
()
->
hasCall
(
callId
))
{
return
;
return
;
}
}
...
@@ -1015,7 +1036,8 @@ CallAdapter::muteThisCallToggle(bool mute)
...
@@ -1015,7 +1036,8 @@ CallAdapter::muteThisCallToggle(bool mute)
void
void
CallAdapter
::
recordThisCallToggle
()
CallAdapter
::
recordThisCallToggle
()
{
{
const
auto
callId
=
lrcInstance_
->
getCallIdForConversationUid
(
convUid_
,
accountId_
);
const
auto
callId
=
lrcInstance_
->
getCallIdForConversationUid
(
lrcInstance_
->
get_selectedConvUid
(),
accountId_
);
if
(
callId
.
isEmpty
()
||
!
lrcInstance_
->
getCurrentCallModel
()
->
hasCall
(
callId
))
{
if
(
callId
.
isEmpty
()
||
!
lrcInstance_
->
getCurrentCallModel
()
->
hasCall
(
callId
))
{
return
;
return
;
}
}
...
@@ -1028,7 +1050,8 @@ CallAdapter::recordThisCallToggle()
...
@@ -1028,7 +1050,8 @@ CallAdapter::recordThisCallToggle()
void
void
CallAdapter
::
videoPauseThisCallToggle
(
bool
mute
)
CallAdapter
::
videoPauseThisCallToggle
(
bool
mute
)
{
{
const
auto
callId
=
lrcInstance_
->
getCallIdForConversationUid
(
convUid_
,
accountId_
);
const
auto
callId
=
lrcInstance_
->
getCallIdForConversationUid
(
lrcInstance_
->
get_selectedConvUid
(),
accountId_
);
if
(
callId
.
isEmpty
()
||
!
lrcInstance_
->
getCurrentCallModel
()
->
hasCall
(
callId
))
{
if
(
callId
.
isEmpty
()
||
!
lrcInstance_
->
getCurrentCallModel
()
->
hasCall
(
callId
))
{
return
;
return
;
}
}
...
...
This diff is collapsed.
Click to expand it.
src/calladapter.h
+
0
−
1
View file @
69f7ef19
...
@@ -127,7 +127,6 @@ private:
...
@@ -127,7 +127,6 @@ private:
void
saveConferenceSubcalls
();
void
saveConferenceSubcalls
();
QString
accountId_
;
QString
accountId_
;
QString
convUid_
;
ScreenSaver
screenSaver
;
ScreenSaver
screenSaver
;
SystemTray
*
systemTray_
;
SystemTray
*
systemTray_
;
...
...
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