mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-30 19:10:38 +00:00
Implement configuring of group link
This commit is contained in:
parent
3de30e166f
commit
03589f858b
7 changed files with 121 additions and 5 deletions
35
src/main/java/org/asamk/signal/GroupLinkState.java
Normal file
35
src/main/java/org/asamk/signal/GroupLinkState.java
Normal file
|
@ -0,0 +1,35 @@
|
|||
package org.asamk.signal;
|
||||
|
||||
public enum GroupLinkState {
|
||||
ENABLED {
|
||||
@Override
|
||||
public String toString() {
|
||||
return "enabled";
|
||||
}
|
||||
},
|
||||
ENABLED_WITH_APPROVAL {
|
||||
@Override
|
||||
public String toString() {
|
||||
return "enabled-with-approval";
|
||||
}
|
||||
},
|
||||
DISABLED {
|
||||
@Override
|
||||
public String toString() {
|
||||
return "disabled";
|
||||
}
|
||||
};
|
||||
|
||||
public org.asamk.signal.manager.groups.GroupLinkState toLinkState() {
|
||||
switch (this) {
|
||||
case ENABLED:
|
||||
return org.asamk.signal.manager.groups.GroupLinkState.ENABLED;
|
||||
case ENABLED_WITH_APPROVAL:
|
||||
return org.asamk.signal.manager.groups.GroupLinkState.ENABLED_WITH_APPROVAL;
|
||||
case DISABLED:
|
||||
return org.asamk.signal.manager.groups.GroupLinkState.DISABLED;
|
||||
default:
|
||||
throw new AssertionError();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue