You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+43-39Lines changed: 43 additions & 39 deletions
Original file line number
Diff line number
Diff line change
@@ -397,7 +397,7 @@ You can then use the [textarea-action-handler](#events-api) event to call your o
397
397
398
398
**(21)**`accepted-files` can be used to set specifics file types allowed in chat. By default, all file types are allowed: `"*"`.
399
399
400
-
Example: set `"accepted-files="image/png, image/jpeg, application/pdf"` to allow `JPG``PNG` and `PDF` files
400
+
Example: set `"accepted-files="image/png, image/jpeg, application/pdf"` to allow `JPG``PNG` and `PDF` files only
401
401
402
402
**(22)**`styles` can be used to customize your own theme. You can find the full list [here](src/themes/index.js)
403
403
@@ -481,7 +481,7 @@ rooms="[
481
481
482
482
### Messages prop
483
483
484
-
Message objects are rendered differently depending on their type. Currently, only text, emoji and file types are supported.<br><br>
484
+
Message objects are rendered differently depending on their type. Text, emoji, image, video and file types are supported.<br><br>
485
485
Each message object has a `senderId` field which holds the id of the corresponding agent. If `senderId` matches the `currentUserId` prop, specific UI and actions will be implemented.<br><br>
|`delete-message`|`{ roomId, message }`| Deleted a message |
567
+
|`open-file`|`{ message, file }`| Clicked to view or download a file |
568
+
|`open-user-tag`(3) |`{ user }`| Clicked on a user tag inside a message |
569
+
|`add-room`| - | Clicked on the plus icon next to searchbar |
570
+
|`room-action-handler`(4) |`{ roomId, action }`| Clicked on the vertical dots icon inside a room |
571
+
|`menu-action-handler`(5) |`{ roomId, action }`| Clicked on the vertical dots icon inside a room |
572
+
|`message-action-handler`(6) |`{ roomId, action, message }`| Clicked on the dropdown icon inside a message |
573
+
|`send-message-reaction`|`{ roomId, messageId, reaction, remove }`| Clicked on the emoji icon inside a message |
574
+
|`room-info` (7) |`room`| Clicked the room header bar |
575
+
|`toggle-rooms-list`|`{ opened }`| Clicked on the toggle icon inside a room header |
576
+
|`textarea-action-handler`(8) |`{ roomId, message }`| Clicked on custom icon inside the footer |
577
+
|`typing-message`|`{ message, roomId }`| Started typing a message |
574
578
575
579
**(1)**`fetch-messages` is triggered every time a room is opened. If the room is opened for the first time, the `options` param will hold `reset: true`.<br>
576
580
**(1)**`fetch-messages` should be a method implementing a pagination system. Its purpose is to load older messages of a conversation when the user scroll on top.
**(9)**Array of files where each file contain: `{ blob, localURL, name, size, type, extension }`
639
643
640
644
**(10)**`replyMessage` object is available when the user replied to another message by clicking the corresponding icon, and contains the message information that was clicked.
0 commit comments