From cb37df882edc51ed47f4b353ce42eabd80416b19 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Thu, 19 Nov 2020 11:17:40 -0500 Subject: Add notices on action completion --- session.go | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'session.go') diff --git a/session.go b/session.go index 950b324..8ea9634 100644 --- a/session.go +++ b/session.go @@ -57,6 +57,7 @@ type Session struct { pings chan struct{} timer *time.Timer store Store + notice string imapLocker sync.Mutex imapConn *imapclient.Client // protected by locker, can be nil @@ -183,6 +184,16 @@ func (s *Session) PopAttachment(uuid string) *Attachment { return a } +func (s *Session) PutNotice(n string) { + s.notice = n +} + +func (s *Session) PopNotice() string { + n := s.notice + s.notice = "" + return n +} + // Store returns a store suitable for storing persistent user data. func (s *Session) Store() Store { return s.store -- cgit v1.2.3-59-g8ed1b