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
c353360e
Commit
c353360e
authored
4 years ago
by
Pierre Lespagnol
Committed by
Albert Babí Oller
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
conference: add kick participant for moderator
Change-Id: Ife3de2e6174a9914fe4f164b8ac5a0bf653f0656
parent
0fa4fe6f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
Loading
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/calladapter.cpp
+13
-23
13 additions, 23 deletions
src/calladapter.cpp
src/calladapter.h
+1
-1
1 addition, 1 deletion
src/calladapter.h
src/mainview/components/ParticipantOverlayMenu.qml
+1
-1
1 addition, 1 deletion
src/mainview/components/ParticipantOverlayMenu.qml
with
15 additions
and
25 deletions
src/calladapter.cpp
+
13
−
23
View file @
c353360e
...
...
@@ -723,8 +723,8 @@ CallAdapter::setModerator(const QString& uri, const bool state)
}
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
*
convModel
=
LRCInstance
::
getCurrentConversationModel
();
const
auto
conversation
=
convModel
->
getConversationForUID
(
LRCInstance
::
getCurrentConvUid
());
...
...
@@ -760,29 +760,19 @@ CallAdapter::isMuted(const QString& uri) const
return
false
;
}
bool
CallAdapter
::
isCurrentMuted
()
const
void
CallAdapter
::
hangupParticipant
(
const
QString
&
uri
)
{
auto
*
callModel
=
LRCInstance
::
getAccountInfo
(
accountId_
).
callModel
.
get
();
auto
*
convModel
=
LRCInstance
::
getCurrentConversationModel
();
const
auto
convInfo
=
convModel
->
getConversationForUID
(
convUid_
);
if
(
!
convInfo
.
uid
.
isEmpty
())
{
auto
*
callModel
=
LRCInstance
::
getAccountInfo
(
accountId_
).
callModel
.
get
();
try
{
auto
call
=
callModel
->
getCall
(
convInfo
.
callId
);
if
(
call
.
participantsInfos
.
size
()
==
0
)
{
return
false
;
}
else
{
auto
&
accInfo
=
LRCInstance
::
accountModel
().
getAccountInfo
(
accountId_
);
for
(
const
auto
&
participant
:
call
.
participantsInfos
)
{
if
(
participant
[
"uri"
]
==
accInfo
.
profileInfo
.
uri
)
return
participant
[
"audioMuted"
]
==
"true"
;
}
}
return
false
;
}
catch
(...)
{
}
}
return
true
;
const
auto
conversation
=
convModel
->
getConversationForUID
(
LRCInstance
::
getCurrentConvUid
());
auto
confId
=
conversation
.
confId
;
if
(
confId
.
isEmpty
())
confId
=
conversation
.
callId
;
try
{
const
auto
call
=
callModel
->
getCall
(
confId
);
callModel
->
hangupParticipant
(
confId
,
uri
);
}
catch
(...)
{}
}
void
...
...
This diff is collapsed.
Click to expand it.
src/calladapter.h
+
1
−
1
View file @
c353360e
...
...
@@ -69,7 +69,7 @@ public:
Q_INVOKABLE
QVariantList
getConferencesInfos
();
Q_INVOKABLE
void
muteParticipant
(
const
QString
&
uri
,
const
bool
state
);
Q_INVOKABLE
bool
isMuted
(
const
QString
&
uri
)
const
;
Q_INVOKABLE
bool
isCurrentMuted
()
const
;
Q_INVOKABLE
void
hangupParticipant
(
const
QString
&
uri
)
;
signals
:
void
callStatusChanged
(
int
index
,
const
QString
&
accountId
,
const
QString
&
convUid
);
...
...
This diff is collapsed.
Click to expand it.
src/mainview/components/ParticipantOverlayMenu.qml
+
1
−
1
View file @
c353360e
...
...
@@ -249,7 +249,7 @@ Rectangle {
source
:
"
qrc:/images/icons/ic_block_24px.svg
"
imageColor
:
hovered
?
JamiTheme
.
darkGreyColor
:
JamiTheme
.
whiteColor
onClicked
:
CallAdapter
.
hangup
Call
(
uri
)
onClicked
:
CallAdapter
.
hangup
Participant
(
uri
)
onHoveredChanged
:
hangupParticipantToolTip
.
visible
=
hovered
Text
{
...
...
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