aboutsummaryrefslogtreecommitdiff
path: root/telegram/commands.go
diff options
context:
space:
mode:
authorBohdan Horbeshko <bodqhrohro@gmail.com>2023-11-12 00:10:23 +0300
committerBohdan Horbeshko <bodqhrohro@gmail.com>2023-11-12 00:10:23 +0300
commit576acba0d18717da5abc5a232cf92c23c9b8a550 (patch)
treee6527fc83726c07ba1a96cea54fb8b63b82aff27 /telegram/commands.go
parent67b8ad57f0aab1a033cbd8bcc8e75cf23342f5f9 (diff)
Migrate to TDLib 1.8.21
Diffstat (limited to 'telegram/commands.go')
-rw-r--r--telegram/commands.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/telegram/commands.go b/telegram/commands.go
index 87fff72..48c3615 100644
--- a/telegram/commands.go
+++ b/telegram/commands.go
@@ -422,7 +422,7 @@ func (c *Client) ProcessTransportCommand(cmdline string, resource string) string
text := rawCmdArguments(cmdline, 1)
_, err = c.client.ReportChat(&client.ReportChatRequest{
ChatId: contact.Id,
- Reason: &client.ChatReportReasonCustom{},
+ Reason: &client.ReportReasonCustom{},
Text: text,
})
if err != nil {
@@ -710,18 +710,18 @@ func (c *Client) ProcessChatCommand(chatID int64, cmdline string) (string, bool)
}
// blacklists current user
case "block":
- _, err := c.client.ToggleMessageSenderIsBlocked(&client.ToggleMessageSenderIsBlockedRequest{
+ _, err := c.client.SetMessageSenderBlockList(&client.SetMessageSenderBlockListRequest{
SenderId: &client.MessageSenderUser{UserId: chatID},
- IsBlocked: true,
+ BlockList: &client.BlockListMain{},
})
if err != nil {
return err.Error(), true
}
// unblacklists current user
case "unblock":
- _, err := c.client.ToggleMessageSenderIsBlocked(&client.ToggleMessageSenderIsBlockedRequest{
+ _, err := c.client.SetMessageSenderBlockList(&client.SetMessageSenderBlockListRequest{
SenderId: &client.MessageSenderUser{UserId: chatID},
- IsBlocked: false,
+ BlockList: nil,
})
if err != nil {
return err.Error(), true