From 911733495ea84509d547b542269c963a4ff38484 Mon Sep 17 00:00:00 2001 From: Gregory 'Rudi' Rudolph Date: Tue, 24 Sep 2019 21:36:55 -0400 Subject: [PATCH] React only to messages in current chat --- main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index ab3ebbe..d502ab7 100644 --- a/main.go +++ b/main.go @@ -235,7 +235,9 @@ func handleMessage(api keybase.ChatAPI, g *gocui.Gui) { if api.Msg.Channel.MembersType == channel.MembersType && cleanChannelName(api.Msg.Channel.Name) == channel.Name { printToView(g, "Chat", fmt.Sprintf("[%s]: %s", msgSender, msgBody)) chat := k.NewChat(channel) + lastMessage.ID = api.Msg.ID chat.Read(api.Msg.ID) + } } else { if api.Msg.Channel.MembersType == keybase.TEAM { @@ -245,7 +247,6 @@ func handleMessage(api keybase.ChatAPI, g *gocui.Gui) { printToView(g, "Chat", fmt.Sprintf("PM @%s [%s]: %s", cleanChannelName(channelName), msgSender, msgBody)) } } - lastMessage = api } else { //TODO: For edit/delete run this if api.Msg.Channel.MembersType == channel.MembersType && cleanChannelName(api.Msg.Channel.Name) == channel.Name {