Skip to content

Commit c91c883

Browse files
committed
chore: temp compatability
1 parent d5db5e6 commit c91c883

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/main/kotlin/spp/protocol/platform/auth/RolePermission.kt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,15 @@ enum class RolePermission(val manager: Boolean, val commandType: CommandType) {
9696

9797
companion object {
9898
fun fromString(s: String): RolePermission? {
99+
//todo: remove v0.8.0+
100+
if (s == "ADD_LIVE_VIEW_SUBSCRIPTION") {
101+
return ADD_LIVE_VIEW
102+
} else if (s == "REMOVE_LIVE_VIEW_SUBSCRIPTION") {
103+
return REMOVE_LIVE_VIEW
104+
} else if (s == "GET_LIVE_VIEW_SUBSCRIPTIONS") {
105+
return GET_LIVE_VIEWS
106+
}
107+
99108
val exactMatch = values().firstOrNull { it.name.equals(s, true) }
100109
if (exactMatch != null) {
101110
return exactMatch

0 commit comments

Comments
 (0)