From 14bcd710469d438d374e6932d4b8992e61ae30cb Mon Sep 17 00:00:00 2001 From: Ricardo Balk <14904229+ricardobalk@users.noreply.github.com> Date: Sun, 12 Apr 2020 19:53:05 +0200 Subject: [PATCH] Always listen for dev messages, but drop them if you don't need them --- main.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/main.go b/main.go index 45d20b8..7437808 100644 --- a/main.go +++ b/main.go @@ -363,7 +363,7 @@ func printToView(viewName string, message string) { func updateChatWindow() { runOpts := keybase.RunOptions{ - Dev: dev, + Dev: true, } k.Run(func(api keybase.ChatAPI) { handleMessage(api) @@ -604,11 +604,11 @@ func handleMessage(api keybase.ChatAPI) { } if api.Msg.Channel.MembersType == channel.MembersType && cleanChannelName(api.Msg.Channel.Name) == channel.Name { if channel.MembersType == keybase.USER || channel.MembersType == keybase.TEAM && channel.TopicName == api.Msg.Channel.TopicName && - channel.TopicType == api.Msg.Channel.TopicType { - printToView("Chat", formatOutput(api).string()) - chat := k.NewChat(channel) - lastMessage.ID = api.Msg.ID - chat.Read(api.Msg.ID) + (dev && api.Msg.Channel.TopicType == "dev" || !dev && api.Msg.Channel.TopicType == "chat") { + printToView("Chat", formatOutput(api).string()) + chat := k.NewChat(channel) + lastMessage.ID = api.Msg.ID + chat.Read(api.Msg.ID) } } } else {