Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-client-android
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-client-android
Commits
ac9ad94c
Commit
ac9ad94c
authored
11 months ago
by
Pierre Nicolas
Browse files
Options
Downloads
Patches
Plain Diff
conversation_details: enable unban
GitLab:
#1747
Change-Id: Ide7b71afac093f3d6c04d0e41e5f0c0919ff93f8
parent
70f848aa
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
jami-android/libjamiclient/src/main/kotlin/net/jami/services/AccountService.kt
+4
-2
4 additions, 2 deletions
...lient/src/main/kotlin/net/jami/services/AccountService.kt
with
4 additions
and
2 deletions
jami-android/libjamiclient/src/main/kotlin/net/jami/services/AccountService.kt
+
4
−
2
View file @
ac9ad94c
...
@@ -1412,7 +1412,7 @@ class AccountService(
...
@@ -1412,7 +1412,7 @@ class AccountService(
}
}
private
enum
class
ConversationMemberEvent
{
private
enum
class
ConversationMemberEvent
{
Add
,
Join
,
Remove
,
Ban
Add
,
Join
,
Remove
,
Ban
,
Unban
}
}
fun
conversationMemberEvent
(
accountId
:
String
,
conversationId
:
String
,
peerUri
:
String
,
event
:
Int
)
{
fun
conversationMemberEvent
(
accountId
:
String
,
conversationId
:
String
,
peerUri
:
String
,
event
:
Int
)
{
...
@@ -1420,7 +1420,9 @@ class AccountService(
...
@@ -1420,7 +1420,9 @@ class AccountService(
getAccount
(
accountId
)
?.
let
{
account
->
account
.
getSwarm
(
conversationId
)
?.
let
{
conversation
->
getAccount
(
accountId
)
?.
let
{
account
->
account
.
getSwarm
(
conversationId
)
?.
let
{
conversation
->
val
uri
=
Uri
.
fromId
(
peerUri
)
val
uri
=
Uri
.
fromId
(
peerUri
)
when
(
val
memberEvent
=
ConversationMemberEvent
.
entries
[
event
])
{
when
(
val
memberEvent
=
ConversationMemberEvent
.
entries
[
event
])
{
ConversationMemberEvent
.
Add
,
ConversationMemberEvent
.
Join
->
{
ConversationMemberEvent
.
Add
,
ConversationMemberEvent
.
Join
,
ConversationMemberEvent
.
Unban
->
{
val
contact
=
conversation
.
findContact
(
uri
)
val
contact
=
conversation
.
findContact
(
uri
)
if
(
contact
==
null
)
{
if
(
contact
==
null
)
{
val
role
=
if
(
memberEvent
==
ConversationMemberEvent
.
Add
)
val
role
=
if
(
memberEvent
==
ConversationMemberEvent
.
Add
)
...
...
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