AVATAR


Description:

AVATAR

Avatar file_id. This consists of Tox.hash(image). Avatar data. This consists of the image data.

Avatars can be sent at any time the client wishes. Generally, a client will send the avatar to a friend when that friend comes online, and to all friends when the avatar changed. A client can save some traffic by remembering which friend received the updated avatar already and only send it if the friend has an out of date avatar.

Clients who receive avatar send requests can reject it (by sending FileControl.CANCEL before any other controls), or accept it (by sending FileControl.RESUME). The file_id of length HASH_LENGTH bytes (same length as FILE_ID_LENGTH) will contain the hash. A client can compare this hash with a saved hash and send FileControl.CANCEL to terminate the avatar transfer if it matches.

When file_size is set to 0 in the transfer request it means that the client has no avatar.