Breakout react
This commit is contained in:
14
main.go
14
main.go
@ -333,16 +333,7 @@ func handleMessage(api keybase.ChatAPI) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
func reactToMessage(reaction string) {
|
|
||||||
chat := k.NewChat(channel)
|
|
||||||
chat.React(lastMessage.ID, reaction)
|
|
||||||
|
|
||||||
}
|
|
||||||
func reactToMessageId(messageId string, reaction string) {
|
|
||||||
chat := k.NewChat(channel)
|
|
||||||
ID, _ := strconv.Atoi(messageId)
|
|
||||||
chat.React(ID, reaction)
|
|
||||||
}
|
|
||||||
func handleInput() error {
|
func handleInput() error {
|
||||||
clearView("Input")
|
clearView("Input")
|
||||||
inputString, _ := getInputString()
|
inputString, _ := getInputString()
|
||||||
@ -361,11 +352,8 @@ func handleInput() error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if inputString[:1] == "+" {
|
|
||||||
reactToMessage(strings.Replace(inputString, "+", "", 1))
|
|
||||||
} else {
|
|
||||||
go sendChat(inputString)
|
go sendChat(inputString)
|
||||||
}
|
|
||||||
go populateList()
|
go populateList()
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user