diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/msgstore.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/msgstore.go b/lib/msgstore.go index 56725e3..5b4d540 100644 --- a/lib/msgstore.go +++ b/lib/msgstore.go @@ -265,3 +265,17 @@ func (store *MessageStore) Move(uids []uint32, dest string, createDest bool, store.update() } + +func (store *MessageStore) Read(uids []uint32, read bool, + cb func(msg types.WorkerMessage)) { + + var set imap.SeqSet + for _, uid := range uids { + set.AddNum(uid) + } + + store.worker.PostAction(&types.ReadMessages{ + Read: read, + Uids: set, + }, cb) +} |