From 04af1b93dc95d761b4e05a448c9d86ac67623ff6 Mon Sep 17 00:00:00 2001 From: r Date: Fri, 17 Apr 2020 17:19:11 +0000 Subject: Add account {,un}subscribe --- service/service.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'service/service.go') diff --git a/service/service.go b/service/service.go index b039849..3a48e77 100644 --- a/service/service.go +++ b/service/service.go @@ -52,6 +52,8 @@ type Service interface { UnMute(ctx context.Context, c *model.Client, id string) (err error) Block(ctx context.Context, c *model.Client, id string) (err error) UnBlock(ctx context.Context, c *model.Client, id string) (err error) + Subscribe(ctx context.Context, c *model.Client, id string) (err error) + UnSubscribe(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) @@ -839,6 +841,16 @@ func (svc *service) UnBlock(ctx context.Context, c *model.Client, id string) (er return } +func (svc *service) Subscribe(ctx context.Context, c *model.Client, id string) (err error) { + _, err = c.Subscribe(ctx, id) + return +} + +func (svc *service) UnSubscribe(ctx context.Context, c *model.Client, id string) (err error) { + _, err = c.UnSubscribe(ctx, id) + return +} + func (svc *service) SaveSettings(ctx context.Context, c *model.Client, settings *model.Settings) (err error) { -- cgit v1.2.3