commit 1910dab

Hubert Hirtz  ·  2020-08-16 14:34:50 +0000 UTC
parent 0023f4c
ui: Show /me from self when echo-message is off
1 files changed,  +6, -3
M app.go
M app.go
+6, -3
 1@@ -323,9 +323,12 @@ func (app *App) handleInput(buffer, content string) {
 2 			return
 3 		}
 4 
 5-		line := fmt.Sprintf("\x01ACTION %s\x01", args)
 6-		app.s.PrivMsg(buffer, line)
 7-		// TODO echo message
 8+		args := fmt.Sprintf("\x01ACTION %s\x01", args)
 9+		app.s.PrivMsg(buffer, args)
10+		if !app.s.HasCapability("echo-message") {
11+			line := ui.LineFromIRCMessage(time.Now(), app.s.Nick(), args, false, false)
12+			app.win.AddLine(buffer, line)
13+		}
14 	case "MSG":
15 		split := strings.SplitN(args, " ", 2)
16 		if len(split) < 2 {