summaryrefslogtreecommitdiff
path: root/getNextAutoTopic.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-09-01 13:32:25 -0500
committerJeff Carr <[email protected]>2025-09-01 13:32:25 -0500
commit5dadf3b5ef3f58c80c7a62f96a0a62b4a784961b (patch)
treeb1f4b5880aaaaab50cce43eac30eb203361d458b /getNextAutoTopic.go
parentcdc4155ef1b783b10b3c74f43171d43c690dd995 (diff)
add a GUI
Diffstat (limited to 'getNextAutoTopic.go')
-rw-r--r--getNextAutoTopic.go22
1 files changed, 22 insertions, 0 deletions
diff --git a/getNextAutoTopic.go b/getNextAutoTopic.go
new file mode 100644
index 0000000..70f4e13
--- /dev/null
+++ b/getNextAutoTopic.go
@@ -0,0 +1,22 @@
+package main
+
+import (
+ "strconv"
+ "strings"
+
+ "go.wit.com/log"
+)
+
+func getNextAutoTopic() {
+ max := 0
+ for _, chat := range me.chats.GetChats() {
+ if strings.HasPrefix(chat.GetChatName(), "Auto ") {
+ numStr := strings.TrimPrefix(chat.GetChatName(), "Auto ")
+ num, err := strconv.Atoi(numStr)
+ if err == nil && num > max {
+ max = num
+ }
+ }
+ }
+ log.Printf("Auto %d", max+1)
+}