aboutsummaryrefslogtreecommitdiffstats
path: root/session.go
diff options
context:
space:
mode:
authorLibravatarLibravatar Drew DeVault <[email protected]> 2020-11-19 11:17:40 -0500
committerLibravatarLibravatar Drew DeVault <[email protected]> 2020-11-19 11:17:40 -0500
commitcb37df882edc51ed47f4b353ce42eabd80416b19 (patch)
tree42b060f231d5d976626f6a04b9e3160f974066f0 /session.go
parent405c18d21388f1cc6f8b7349186efb3fa44eef87 (diff)
downloadalps-cb37df882edc51ed47f4b353ce42eabd80416b19.tar.gz
alps-cb37df882edc51ed47f4b353ce42eabd80416b19.tar.bz2
alps-cb37df882edc51ed47f4b353ce42eabd80416b19.zip
Add notices on action completion
Diffstat (limited to 'session.go')
-rw-r--r--session.go11
1 files changed, 11 insertions, 0 deletions
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