forked from kevadesu/forgejo
added test for reading inline attachments
This commit is contained in:
parent
b796694cd5
commit
aeb544aff7
2 changed files with 46 additions and 1 deletions
|
@ -219,7 +219,7 @@ loop:
|
|||
}
|
||||
|
||||
err := func() error {
|
||||
if handledSet.Contains(msg.SeqNum) {
|
||||
if isAlreadyHandled(handledSet, msg) {
|
||||
log.Debug("Skipping already handled message")
|
||||
return nil
|
||||
}
|
||||
|
@ -282,6 +282,11 @@ loop:
|
|||
return nil
|
||||
}
|
||||
|
||||
// isAlreadyHandled tests if the message was already handled
|
||||
func isAlreadyHandled(handledSet *imap.SeqSet, msg *imap.Message) bool {
|
||||
return handledSet.Contains(msg.SeqNum)
|
||||
}
|
||||
|
||||
// isAutomaticReply tests if the headers indicate an automatic reply
|
||||
func isAutomaticReply(env *enmime.Envelope) bool {
|
||||
autoSubmitted := env.GetHeader("Auto-Submitted")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue