Layer 220
MessagesSetChatWallPaper
Set a custom wallpaper in a specific private chat with another user.
method
Users
messages.setChatWallPaper#8ffacae1 flags:# for_both:flags.3?true revert:flags.4?true peer:InputPeer wallpaper:flags.0?InputWallPaper settings:flags.2?WallPaperSettings id:flags.1?int = Updates;
Parameters
| Name | Type | Description |
|---|---|---|
| Flags | # | Flags, see TL conditional fields |
| ForBoth | flags.3?true | Only for Premium users, sets the specified wallpaper for both users of the chat, without requiring confirmation from the other user. |
| Revert | flags.4?true | 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 | InputPeer | The private chat where the wallpaper will be set |
| Wallpaper | flags.0?InputWallPaper | The wallpaper, obtained as described in the wallpaper documentation; must not be provided when installing a wallpaper obtained from a message Action Set Chat Wall Paper service message ( id must be provided, instead). |
| Settings | flags.2?WallPaperSettings | Wallpaper settings, obtained as described in the wallpaper documentation or from message Action Set Chat Wall Paper. wallpaper. settings. |
| Id | flags.1?int | If the wallpaper was obtained from a message Action Set Chat Wall Paper service message, must contain the ID of that message. |
Returns
UpdatesPossible 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. |
Gogram Example
// MessagesSetChatWallPaper - using Params struct result, err := client.MessagesSetChatWallPaper(&tg.MessagesSetChatWallPaperParams{ Peer: &tg.InputPeerUser{UserID: int64(123456789)}, // Optional fields: // ForBoth: true, // Revert: true, // Wallpaper: &tg.InputWallPaper{}, // Settings: &tg.WallPaperSettings{}, // ... }) if err != nil { // handle error } // result is *tg.Updates