Add conversation muting
[bloat] / service / service.go
index ab6261e795d80ef7ddd02104ebb5eee9a30d5570..043191b62a6533682e70ffd2713423db05368040 100644 (file)
@@ -44,6 +44,8 @@ type Service interface {
        Follow(ctx context.Context, c *model.Client, id string) (err error)
        UnFollow(ctx context.Context, c *model.Client, id string) (err error)
        SaveSettings(ctx context.Context, c *model.Client, settings *model.Settings) (err error)
+       MuteConversation(ctx context.Context, c *model.Client, id string) (err error)
+       UnMuteConversation(ctx context.Context, c *model.Client, id string) (err error)
 }
 
 type service struct {
@@ -848,3 +850,15 @@ func (svc *service) SaveSettings(ctx context.Context, c *model.Client,
        session.Settings = *settings
        return svc.sessionRepo.Add(session)
 }
+
+func (svc *service) MuteConversation(ctx context.Context, c *model.Client, 
+       id string) (err error) {
+       _, err = c.MuteConversation(ctx, id)
+       return
+}
+
+func (svc *service) UnMuteConversation(ctx context.Context, c *model.Client, 
+       id string) (err error) {
+       _, err = c.UnmuteConversation(ctx, id)
+       return
+}