Skip to main content

messages.reportSpam

Report a new incoming chat for spam, if the peer settings of the chat allow us to do that

func (c *Client) MessagesReportSpam(ctx context.Context, peer InputPeerClass) (bool, error)

Calling this method

client.Run(ctx, func(ctx context.Context) error {
api := client.API()

res, err := api.MessagesReportSpam(ctx, peer)
if err != nil {
return err
}
_ = res // bool
return nil
})

Parameters

NameTypeRequiredDescription
PeerInputPeerClassyesPeer to report

Returns

bool

Possible errors

CodeTypeDescription
400CHANNEL_PRIVATEYou haven't joined this channel/supergroup.
400MSG_ID_INVALIDInvalid message ID provided.
400PEER_ID_INVALIDThe provided peer id is invalid.

References