diff options
author | r <r@freesoftwareextremist.com> | 2020-02-02 07:24:06 +0000 |
---|---|---|
committer | r <r@freesoftwareextremist.com> | 2020-02-02 07:24:06 +0000 |
commit | 4d9e0af373b3a92d04498070c6fc8f6c197fc9c0 (patch) | |
tree | cdd8f8f3b2decbcf85bad4235bb4b914f39bbaad /service/auth.go | |
parent | c702a2b501769697576d601875d1db4553eeff12 (diff) | |
download | bloat-4d9e0af373b3a92d04498070c6fc8f6c197fc9c0.tar.gz bloat-4d9e0af373b3a92d04498070c6fc8f6c197fc9c0.zip |
Add conversation muting
Diffstat (limited to 'service/auth.go')
-rw-r--r-- | service/auth.go | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/service/auth.go b/service/auth.go index 5ffe9ea..afb324a 100644 --- a/service/auth.go +++ b/service/auth.go @@ -284,3 +284,27 @@ func (s *as) SaveSettings(ctx context.Context, c *model.Client, settings *model. } return s.Service.SaveSettings(ctx, c, settings) } + +func (s *as) MuteConversation(ctx context.Context, c *model.Client, id string) (err error) { + err = s.authenticateClient(ctx, c) + if err != nil { + return + } + err = checkCSRF(ctx, c) + if err != nil { + return + } + return s.Service.MuteConversation(ctx, c, id) +} + +func (s *as) UnMuteConversation(ctx context.Context, c *model.Client, id string) (err error) { + err = s.authenticateClient(ctx, c) + if err != nil { + return + } + err = checkCSRF(ctx, c) + if err != nil { + return + } + return s.Service.UnMuteConversation(ctx, c, id) +} |