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

Don't post current chat to feed

This commit is contained in:
Gregory Rudolph
2019-10-02 10:01:16 -04:00
parent 094a732312
commit 75bfb3a690

View File

@ -297,13 +297,20 @@ func handleMessage(api keybase.ChatAPI, g *gocui.Gui) {
topicName := api.Msg.Channel.TopicName
for _, m := range api.Msg.Content.Text.UserMentions {
if m.Text == k.Username {
// We are in a team
if topicName != channel.TopicName {
printToView(g, "Feed", fmt.Sprintf("[ %s#%s ] %s: %s", channelName, topicName, msgSender, msgBody))
}
break
}
}
} else {
if msgSender != channel.Name {
printToView(g, "Feed", fmt.Sprintf("PM from @%s: %s", cleanChannelName(channelName), msgBody))
}
}
}
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 {