Chat Update: Overview of Methods
After creating a chat, you can assign a different owner or change its appearance. Who can change the appearance depends on the chat settings:
- all participants,
- the owner and chat administrators,
- only the owner.
Quick navigation: all methods
Relationship of Methods with Other Objects
Chat. To change the chat parameters, pass the chat identifier CHAT_ID to the method. You can obtain the chat identifier using the method:
- creating a chat,
- getting the chat identifier,
- getting the list of chats,
- getting a shortened list of recent chats.
User. To change the owner of the chat, specify their identifier in the USER_ID parameter. You can obtain the user identifier using the getting the list of users method or the getting the list of chat participants method.
Change Chat Owner
You can change the chat owner using the im.chat.setOwner method. The new owner will receive full access permissions to the chat.
Only the current owner of the chat can use this method.
Update Icon
You can update the chat icon using the im.chat.updateAvatar method. Pass the image in the AVATAR parameter as a base64 string, for example, 'AVATAR': 'iVBOKLSR…Rw0K=='.
After the update, a system message will be sent to the chat: John Smith changed the chat icon.
Documentation
Change Color
By default, the system randomly selects the chat color. The color is displayed if there is no icon.
You can change the color using the im.chat.updateColor method. In the COLOR parameter, pass the name of the color from the list of supported colors. After the change, a system message will be sent to the chat: John Smith changed the chat color to "Mint".
Change Title
You can change the chat title using the im.chat.updateTitle method. After the change, a system message will be sent to the chat: John Smith changed the chat title to "New Chat Title".
Overview of Methods
Scope:
imWho can execute the method: depends on the method
|
Method |
Description |
|
Changes the chat owner |
|
|
Changes the chat icon |
|
|
Changes the chat color |
|
|
Changes the chat title |