messages.setChatWallPaper
Set a custom wallpaper » in a specific private chat with another user.
func (c *Client) MessagesSetChatWallPaper(ctx context.Context, request *MessagesSetChatWallPaperRequest) (UpdatesClass, error)
Calling this method
client.Run(ctx, func(ctx context.Context) error {
api := client.API()
res, err := api.MessagesSetChatWallPaper(ctx, &tg.MessagesSetChatWallPaperRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // UpdatesClass
return nil
})
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
ForBoth | bool | — | Only for Premium users, sets the specified wallpaper for both users of the chat, without requiring confirmation from the other user. |
Revert | bool | — | If we don't like the new wallpaper the other user of the chat has chosen for us using the for_both flag, we can re-set our previous wallpaper just on our side using this flag. |
Peer | InputPeerClass | yes | The private chat where the wallpaper will be set |
Wallpaper | InputWallPaperClass | — | The wallpaper », obtained as described in the wallpaper documentation »; must not be provided when installing a wallpaper obtained from a messageActionSetChatWallPaper service message (id must be provided, instead). |
Settings | WallPaperSettings | — | Wallpaper settings, obtained as described in the wallpaper documentation » or from messageActionSetChatWallPaper.wallpaper.settings. |
ID | int | — | If the wallpaper was obtained from a messageActionSetChatWallPaper service message, must contain the ID of that message. |
Returns
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | PEER_ID_INVALID | The provided peer id is invalid. |
| 400 | WALLPAPER_INVALID | The specified wallpaper is invalid. |
| 400 | WALLPAPER_NOT_FOUND | The specified wallpaper could not be found. |
References
- Official documentation
- Generated Go reference
- TL definition:
messages.setChatWallPaper#8ffacae1