aboutsummaryrefslogtreecommitdiff
path: root/telegram/commands.go
diff options
context:
space:
mode:
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