mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 18:40:39 +00:00
Implement setting group permissions
This commit is contained in:
parent
7170a68571
commit
78f22c7020
7 changed files with 104 additions and 13 deletions
27
src/main/java/org/asamk/signal/GroupPermission.java
Normal file
27
src/main/java/org/asamk/signal/GroupPermission.java
Normal file
|
@ -0,0 +1,27 @@
|
|||
package org.asamk.signal;
|
||||
|
||||
public enum GroupPermission {
|
||||
EVERY_MEMBER {
|
||||
@Override
|
||||
public String toString() {
|
||||
return "every-member";
|
||||
}
|
||||
},
|
||||
ONLY_ADMINS {
|
||||
@Override
|
||||
public String toString() {
|
||||
return "only-admins";
|
||||
}
|
||||
};
|
||||
|
||||
public org.asamk.signal.manager.groups.GroupPermission toManager() {
|
||||
switch (this) {
|
||||
case EVERY_MEMBER:
|
||||
return org.asamk.signal.manager.groups.GroupPermission.EVERY_MEMBER;
|
||||
case ONLY_ADMINS:
|
||||
return org.asamk.signal.manager.groups.GroupPermission.ONLY_ADMINS;
|
||||
default:
|
||||
throw new AssertionError();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue