Chat Avatars

Chat avatar image is an image that appears next to a chat message.

Chat avatars are images representing the sender of a chat message.

📘

Avatars are properties of chat messages

Chat avatars are properties on individual chat messages, not on profiles. That means that the same user can have different avatars in different rooms, or even on different messages in the same room.

Enabling Avatars

If a chat message has a valid avatar associated, the avatar will be displayed inside of the message element. If the avatar is missing or invalid, a default avatar will be shown instead.

<livelike-chat showavatar></livelike-chat>
chatsession.shouldDisplayAvatar= <true|false>
var config = ChatSessionConfig(roomID: "example-room-id")
config.shouldDisplayAvatar = true

Setting Avatars

Setting the an avatar will cause all future messages sent by the current user to the room to use that avatar.

<livelike-chat showavatar avatarurl="https://example.com/my-avatar.png" roomid="648bb105-bba4-4c3c-8017-e8f390681759"></livelike-chat>
chatsession.avatarUrl = "https://example.com/my-avatar.png"
chatSession.avatarURL = "https://example.com/my-avatar.png"