1
0
mirror of https://github.com/jhillyerd/inbucket.git synced 2025-12-17 17:47:03 +00:00

storage: Add Seen flag, tests for #58

This commit is contained in:
James Hillyerd
2018-03-31 21:46:10 -07:00
parent e3be5362dc
commit cc5cd7f9c3
8 changed files with 100 additions and 0 deletions

View File

@@ -21,6 +21,7 @@ type Message struct {
date time.Time
subject string
source []byte
seen bool
el *list.Element // This message in Store.messages
}
@@ -51,3 +52,6 @@ func (m *Message) Source() (io.ReadCloser, error) {
// Size returns the message size in bytes.
func (m *Message) Size() int64 { return int64(len(m.source)) }
// Seen returns the message seen flag.
func (m *Message) Seen() bool { return m.seen }