/!\ UI code que dans le dossier /ui, index.js:init() est appelée en premier. /!\ N'utiliser que les fonctions dans lib/data.js /!\
Event Type | Field | Description |
---|---|---|
"message" A message was sent to a thread. |
attachments |
An array of attachments to the message. Attachments vary in type, see the attachments table below. |
hasReaction(reaction) |
A reçu la réaction ? : (:string) => boolean | |
reactionMap |
Nombre de réaction : Object, clé (reaction):string, value (amount):integer | |
nbReaction |
Nombre de réaction total : :integer | |
body |
The string corresponding to the message that was just received. | |
isGroup |
boolean, true if this thread is a group thread (more than 2 participants). | |
mentions |
An object containing people mentioned/tagged in the message in the format { id: name } | |
messageID |
A string representing the message ID. | |
senderID |
The id of the person who sent the message in the chat with threadID. | |
threadID |
The threadID representing the thread in which the message was sent. | |
isUnread |
Boolean representing whether or not the message was read. | |
type |
type
Attachment Type | Fields |
---|---|
"sticker" |
ID , url , packID , spriteUrl , spriteUrl2x , width , height , caption , description , frameCount , frameRate , framesPerRow , framesPerCol |
"file" |
ID , filename , url , isMalicious , contentType |
"photo" |
ID , filename , thumbnailUrl , previewUrl , previewWidth , previewHeight , largePreviewUrl , largePreviewWidth , largePreviewHeight |
"animated_image" |
ID , filename , previewUrl , previewWidth , previewHeight , url , width , height |
"video" |
ID , filename , previewUrl , previewWidth , previewHeight , url , width , height , duration , videoType |
"audio" |
ID , filename , audioType , duration , url , isVoiceMail |
"location" |
ID , latitude , longitude , image , width , height , url , address |
"share" |
ID , url , title , description , source , image , width , height , playable , duration , playableUrl , subattachments , properties |
users
dans fetch.js
ou par les différentes méthodes retrounant des listes d'user.
Field | Description |
---|---|
"id" |
Identifiant unique de l'utilisateur |
"name" |
Nom + prénom de l'utilisateur |
"firstName" |
Prénom de l'utilisateur |
"nickname" |
Surnom de l'utilisateur |
"thumbSrc" |
URL de la photo de l'utilisateur |
"nbMeme" |
Nombre de media envoyés |
"nbReaction" |
Nombre de réaction reçue |
"nbNotMeme" |
Nombre de message non medias envoyés |
"nbMessage" |
Nomnbre de messages envoyés |
"messages" |
Liste des messages envoyés. Que dans le cas d'un utilisateur inconnu |