Browse Source

Don't notify me of what I'm saying.

pull/1/head
Gregory Rudolph 5 years ago
parent
commit
700da928e9
Signed by: rudi
GPG Key ID: EF64F3CBD1A1EBDD
  1. 2
      main.go

2
main.go

@ -159,6 +159,7 @@ func handleMessage(api keybase.ChatAPI, g *gocui.Gui) {
msgBody := api.Msg.Content.Text.Body msgBody := api.Msg.Content.Text.Body
msgSender := api.Msg.Sender.Username msgSender := api.Msg.Sender.Username
channelName := api.Msg.Channel.Name channelName := api.Msg.Channel.Name
if msgSender != k.Username {
if api.Msg.Channel.MembersType == keybase.TEAM { if api.Msg.Channel.MembersType == keybase.TEAM {
topicName := api.Msg.Channel.TopicName topicName := api.Msg.Channel.TopicName
for _, m := range api.Msg.Content.Text.UserMentions { for _, m := range api.Msg.Content.Text.UserMentions {
@ -170,6 +171,7 @@ func handleMessage(api keybase.ChatAPI, g *gocui.Gui) {
} else { } else {
printToView(g, "Feed", fmt.Sprintf("[ %s ] %s: %s", channelName, msgSender, msgBody)) printToView(g, "Feed", fmt.Sprintf("[ %s ] %s: %s", channelName, msgSender, msgBody))
} }
}
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 {
printToView(g, "Chat", fmt.Sprintf("%s: %s", msgSender, msgBody)) printToView(g, "Chat", fmt.Sprintf("%s: %s", msgSender, msgBody))
} }

Loading…
Cancel
Save