Skip to main content

contacts.unblock

Deletes a peer from a blocklist, see here » for more info.

func (c *Client) ContactsUnblock(ctx context.Context, request *ContactsUnblockRequest) (bool, error)

Calling this method

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

res, err := api.ContactsUnblock(ctx, &tg.ContactsUnblockRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // bool
return nil
})

Parameters

NameTypeRequiredDescription
MyStoriesFromboolWhether the peer should be removed from the story blocklist; if not set, the peer will be removed from the main blocklist, see here » for more info.
IDInputPeerClassyesPeer

Returns

bool

Possible errors

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

References