1
0
mirror of https://github.com/Rudi9719/kbtui.git synced 2026-03-22 17:57:23 +00:00

Don't error out on api errors

This commit is contained in:
Gregory Rudolph
2019-12-19 12:19:34 -05:00
parent 9714e39751
commit 66e2552a7e

View File

@ -569,6 +569,10 @@ func formatOutput(api keybase.ChatAPI) StyledString {
// Input handling // Input handling
func handleMessage(api keybase.ChatAPI) { func handleMessage(api keybase.ChatAPI) {
if api.Error != nil {
printError(fmt.Sprintf("%+v", api.Error))
return
}
if _, ok := typeCommands[api.Msg.Content.Type]; ok { if _, ok := typeCommands[api.Msg.Content.Type]; ok {
if api.Msg.Channel.MembersType == channel.MembersType && cleanChannelName(api.Msg.Channel.Name) == channel.Name { if api.Msg.Channel.MembersType == channel.MembersType && cleanChannelName(api.Msg.Channel.Name) == channel.Name {
if channel.MembersType == keybase.TEAM && channel.TopicName != api.Msg.Channel.TopicName { if channel.MembersType == keybase.TEAM && channel.TopicName != api.Msg.Channel.TopicName {