- commit
- c247922
- parent
- f18c3b8
- author
- Antonio Mika
- date
- 2024-09-18 14:25:23 +0000 UTC
Added admin listing
1 files changed,
+6,
-1
+6,
-1
1@@ -111,7 +111,12 @@ func WishMiddleware(handler *CliHandler) wish.Middleware {
2 if cmd == "help" {
3 wish.Println(sesh, helpStr)
4 } else if cmd == "ls" {
5- channels := pubsub.PubSub.GetChannels(fmt.Sprintf("%s/", user.Name))
6+ channelFilter := fmt.Sprintf("%s/", user.Name)
7+ if handler.DBPool.HasFeatureForUser(user.ID, "admin") {
8+ channelFilter = ""
9+ }
10+
11+ channels := pubsub.PubSub.GetChannels(channelFilter)
12
13 if len(channels) == 0 {
14 wish.Println(sesh, "no pubsub channels found")