Private channels now triggers notifications as well
@@ -98,6 +98,7 @@ func NewWindow(discord *discordgo.Session) (*Window, error) {
guildList.SetTopLevel(1)
var selectedGuildNode *tview.TreeNode
+
for _, tempGuild := range guilds {
guild := tempGuild
guildNode := tview.NewTreeNode(guild.Name)
@@ -449,6 +450,14 @@ func NewWindow(discord *discordgo.Session) (*Window, error) {
}
}
+ if !mentionsYou {
+ channel, stateError := window.session.State.Channel(message.ChannelID)
+ //TODO Check if channel is muted.
+ if stateError == nil && channel.Type == discordgo.ChannelTypeDM || channel.Type == discordgo.ChannelTypeGroupDM {
+ mentionsYou = true
+ }
+ }
+
if mentionsYou {
beeep.Notify("Cordless - New message", message.ContentWithMentionsReplaced(), "assets/information.png")
}
