mirror of
https://github.com/jhillyerd/inbucket.git
synced 2025-12-18 10:07:02 +00:00
storage: Add Seen flag, tests for #58
This commit is contained in:
@@ -21,6 +21,7 @@ type Metadata struct {
|
||||
Date time.Time
|
||||
Subject string
|
||||
Size int64
|
||||
Seen bool
|
||||
}
|
||||
|
||||
// Message holds both the metadata and content of a message.
|
||||
@@ -109,3 +110,8 @@ func (d *Delivery) Size() int64 {
|
||||
func (d *Delivery) Source() (io.ReadCloser, error) {
|
||||
return ioutil.NopCloser(d.Reader), nil
|
||||
}
|
||||
|
||||
// Seen getter.
|
||||
func (d *Delivery) Seen() bool {
|
||||
return d.Meta.Seen
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user