Skip to content

Commit

Permalink
Fix permalink in email for DMs/GMs (#5751)
Browse files Browse the repository at this point in the history
  • Loading branch information
jwilander authored and grundleborg committed Mar 13, 2017
1 parent a8524b6 commit ca90fe5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions app/notification.go
Expand Up @@ -318,8 +318,7 @@ func SendNotifications(post *model.Post, team *model.Team, channel *model.Channe
}

func sendNotificationEmail(post *model.Post, user *model.User, channel *model.Channel, team *model.Team, senderName string, sender *model.User, siteURL string) *model.AppError {
if channel.IsGroupOrDirect() && channel.TeamId != team.Id {
// this message is a cross-team DM/GM so we need to find a team that the recipient is on to use in the link
if channel.IsGroupOrDirect() {
if result := <-Srv.Store.Team().GetTeamsByUserId(user.Id); result.Err != nil {
return result.Err
} else {
Expand Down

0 comments on commit ca90fe5

Please sign in to comment.