Merge pull request #12 from jjj333-p/patch-1

make /me parsing more efficient
This commit is contained in:
sunglocto
2025-08-09 08:22:09 +01:00
committed by GitHub

View File

@@ -200,10 +200,9 @@ func CreateUITab(chatJidStr string) ChatTabUI {
author.SetText(chatTabs[chatJidStr].Messages[i].Author) author.SetText(chatTabs[chatJidStr].Messages[i].Author)
} }
if strings.Split(msgContent, " ")[0] == "/me" { sl := strings.Split(msgContent, " ")
sl := strings.Split(msgContent, " ") if sl[0] == "/me" {
sl[0] = "" author.SetText(author.Text + strings.Join(sl[1:], " "))
author.SetText(author.Text + strings.Join(sl, " "))
content.SetText(" ") content.SetText(" ")
} }