Unverified Commit 441777a4 authored by Jesús Espino's avatar Jesús Espino Committed by GitHub
Browse files

Only include the avatar attachment if is going to show a message in the invitation (#12747)

parent ade60444
...@@ -445,9 +445,11 @@ func (a *App) SendGuestInviteEmails(team *model.Team, channels []*model.Channel, ...@@ -445,9 +445,11 @@ func (a *App) SendGuestInviteEmails(team *model.Team, channels []*model.Channel,
} }
embeddedFiles := make(map[string]io.Reader) embeddedFiles := make(map[string]io.Reader)
if senderProfileImage != nil { if message != "" {
embeddedFiles = map[string]io.Reader{ if senderProfileImage != nil {
"user-avatar.png": bytes.NewReader(senderProfileImage), embeddedFiles = map[string]io.Reader{
"user-avatar.png": bytes.NewReader(senderProfileImage),
}
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment