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,11 +445,13 @@ func (a *App) SendGuestInviteEmails(team *model.Team, channels []*model.Channel,
embeddedFiles := make(map[string]io.Reader)
if message != "" {
if senderProfileImage != nil {
embeddedFiles = map[string]io.Reader{
"user-avatar.png": bytes.NewReader(senderProfileImage),
if err := a.SendMailWithEmbeddedFiles(invite, subject, bodyPage.Render(), embeddedFiles); err != nil {
mlog.Error(fmt.Sprintf("Failed to send invite email successfully err=%v", err))
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