diff options
author | 2020-11-19 11:17:40 -0500 | |
---|---|---|
committer | 2020-11-19 11:17:40 -0500 | |
commit | cb37df882edc51ed47f4b353ce42eabd80416b19 (patch) | |
tree | 42b060f231d5d976626f6a04b9e3160f974066f0 /session.go | |
parent | 405c18d21388f1cc6f8b7349186efb3fa44eef87 (diff) | |
download | alps-cb37df882edc51ed47f4b353ce42eabd80416b19.tar.gz alps-cb37df882edc51ed47f4b353ce42eabd80416b19.tar.bz2 alps-cb37df882edc51ed47f4b353ce42eabd80416b19.zip |
Add notices on action completion
Diffstat (limited to 'session.go')
-rw-r--r-- | session.go | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -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 |