Skip to content

Commit

Permalink
fix: from is now optional for templated messages
Browse files Browse the repository at this point in the history
paul-conneqtech committed Jun 16, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent dd31e58 commit 51f532e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions messages.go
Original file line number Diff line number Diff line change
@@ -795,10 +795,6 @@ func isValid(m *Message) bool {
}

func (pm *plainMessage) isValid() bool {
if pm.from == "" {
return false
}

if !validateStringList(pm.cc, false) {
return false
}
@@ -812,6 +808,10 @@ func (pm *plainMessage) isValid() bool {
return true
}

if pm.from == "" {
return false
}

if pm.text == "" && pm.html == "" {
return false
}

0 comments on commit 51f532e

Please sign in to comment.