mirror of
https://github.com/Rudi9719/kbtui.git
synced 2026-03-22 14:27:23 +00:00
Don't notify me of what I'm saying.
This commit is contained in:
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))
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user