Skip to main content

messages.hideChatJoinRequest

Dismiss or approve a chat join request related to a specific chat or channel.

func (c *Client) MessagesHideChatJoinRequest(ctx context.Context, request *MessagesHideChatJoinRequestRequest) (UpdatesClass, error)

Calling this method

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

res, err := api.MessagesHideChatJoinRequest(ctx, &tg.MessagesHideChatJoinRequestRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // UpdatesClass
return nil
})

Parameters

NameTypeRequiredDescription
ApprovedboolWhether to dismiss or approve the chat join request »
PeerInputPeerClassyesThe chat or channel
UserIDInputUserClassyesThe user whose join request » should be dismissed or approved

Returns

UpdatesClass

Possible errors

CodeTypeDescription
400CHANNELS_TOO_MUCHYou have joined too many channels/supergroups.
400CHANNEL_PRIVATEYou haven't joined this channel/supergroup.
400CHAT_ADMIN_REQUIREDYou must be an admin in this chat to do this.
403CHAT_WRITE_FORBIDDENYou can't write in this chat.
400HIDE_REQUESTER_MISSINGThe join request was missing or was already handled.
400INPUT_USER_DEACTIVATEDThe specified user was deleted.
400MSG_ID_INVALIDInvalid message ID provided.
400PEER_ID_INVALIDThe provided peer id is invalid.
400USER_ALREADY_PARTICIPANTThe user is already in the group.
403USER_CHANNELS_TOO_MUCHOne of the users you tried to add is already in too many channels/supergroups.
400USER_ID_INVALIDThe provided user ID is invalid.

References