mirror of
https://github.com/Rudi9719/kbtui.git
synced 2026-03-22 14:27:23 +00:00
Update chat if reactions occur: Prep for showing reactions in PS1
This commit is contained in:
@ -21,10 +21,26 @@ func init() {
|
|||||||
|
|
||||||
func tcmdShowReactions(m keybase.ChatAPI) {
|
func tcmdShowReactions(m keybase.ChatAPI) {
|
||||||
where := ""
|
where := ""
|
||||||
|
team := false
|
||||||
if m.Msg.Channel.MembersType == keybase.TEAM {
|
if m.Msg.Channel.MembersType == keybase.TEAM {
|
||||||
|
team = true
|
||||||
where = fmt.Sprintf("in @%s#%s", m.Msg.Channel.Name, m.Msg.Channel.TopicName)
|
where = fmt.Sprintf("in @%s#%s", m.Msg.Channel.Name, m.Msg.Channel.TopicName)
|
||||||
} else {
|
} else {
|
||||||
where = fmt.Sprintf("in a PM")
|
where = fmt.Sprintf("in a PM")
|
||||||
}
|
}
|
||||||
printToView("Feed", fmt.Sprintf("%s reacted to %d with %s %s", m.Msg.Sender.Username, m.Msg.Content.Reaction.M, m.Msg.Content.Reaction.B, where))
|
printToView("Feed", fmt.Sprintf("%s reacted to %d with %s %s", m.Msg.Sender.Username, m.Msg.Content.Reaction.M, m.Msg.Content.Reaction.B, where))
|
||||||
|
if channel.Name == m.Msg.Channel.Name {
|
||||||
|
if team {
|
||||||
|
if channel.TopicName == m.Msg.Channel.TopicName {
|
||||||
|
clearView("Chat")
|
||||||
|
go populateChat()
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
clearView("Chat")
|
||||||
|
go populateChat()
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user