-
Notifications
You must be signed in to change notification settings - Fork 357
/
nsfw_service_impl.go
48 lines (39 loc) · 1.46 KB
/
nsfw_service_impl.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*
* WARNING! All changes made in this file will be lost!
* Created from 'scheme.tl' by 'mtprotoc'
*
* Copyright 2022 Teamgram Authors.
* All rights reserved.
*
* Author: teamgramio (teamgram.io@gmail.com)
*/
package service
import (
"context"
"github.com/teamgram/proto/mtproto"
"github.com/teamgram/teamgram-server/app/bff/nsfw/internal/core"
)
// AccountSetContentSettings
// account.setContentSettings#b574b16b flags:# sensitive_enabled:flags.0?true = Bool;
func (s *Service) AccountSetContentSettings(ctx context.Context, request *mtproto.TLAccountSetContentSettings) (*mtproto.Bool, error) {
c := core.New(ctx, s.svcCtx)
c.Infof("account.setContentSettings - metadata: %s, request: %s", c.MD.DebugString(), request.DebugString())
r, err := c.AccountSetContentSettings(request)
if err != nil {
return nil, err
}
c.Infof("account.setContentSettings - reply: %s", r.DebugString())
return r, err
}
// AccountGetContentSettings
// account.getContentSettings#8b9b4dae = account.ContentSettings;
func (s *Service) AccountGetContentSettings(ctx context.Context, request *mtproto.TLAccountGetContentSettings) (*mtproto.Account_ContentSettings, error) {
c := core.New(ctx, s.svcCtx)
c.Infof("account.getContentSettings - metadata: %s, request: %s", c.MD.DebugString(), request.DebugString())
r, err := c.AccountGetContentSettings(request)
if err != nil {
return nil, err
}
c.Infof("account.getContentSettings - reply: %s", r.DebugString())
return r, err
}