Add conversation muting

This commit is contained in:
r 2020-02-02 07:24:06 +00:00
parent c702a2b501
commit 4d9e0af373
7 changed files with 159 additions and 7 deletions

View 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
}