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

React only to messages in current chat

This commit is contained in:
Gregory 'Rudi' Rudolph
2019-09-24 21:36:55 -04:00
parent d8b5c37d91
commit 911733495e

View File

@ -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 {