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
| fetch-messages (1) |`{ room, options }`| A user has scrolled on top to load more messages |
466
+
| fetch-more-rooms (2) | - | A user has scrolled to load more rooms |
467
+
| send-message |`{ roomId, content, file (7), replyMessage (8), usersTag }`| A user has sent a message |
468
+
| edit-message |`{ roomId, messageId, newContent, file (6), replyMessage (8),usersTag }`| A user has edited a message |
469
+
| delete-message |`{ roomId, messageId }`| A user has deleted a message |
470
+
| open-file |`{ message, action }`| A user has clicked to view or download a file |
471
+
| open-user-tag (3) |`{ user }`| A user has clicked on a user tag inside a message |
472
+
| add-room | - | A user clicks on the plus icon next to searchbar |
473
+
| menu-action-handler (4) |`{ roomId, action }`| A user clicks on the vertical dots icon inside a room |
474
+
| message-action-handler (5) |`{ roomId, action, message }`| A user clicks on the dropdown icon inside a message |
475
+
| send-message-reaction |`{ roomId, messageId, reaction, remove }`| A user clicks on the emoji icon inside a message |
476
+
| room-info |`room`| A user clicks the room header bar |
477
+
| toggle-rooms-list |`{ opened }`| A user clicks on the toggle icon inside a room header |
478
+
| textarea-action-handler (6) |`{ roomId, message }`| A user clicks on custom icon inside the footer |
479
+
| typing-message |`{ message, roomId }`| A user is typing a message |
585
480
586
481
(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>
587
482
(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.
588
483
589
-
(3) `menu-action-handler` is the result of the `menuActions` prop.<br>
590
-
When clicking a button from your `menuActions` array, `menuActionHandler` will give you the name of the button that was click.
484
+
(2) `fetch-more-rooms` is triggered when scrolling down the rooms list, and should be a method implementing a pagination system.
485
+
486
+
(3) `open-user-tag` is triggered when clicking a user tag inside a message. When creating a user tag by typing `@` in the footer textarea and sending the message, the tag will be identified with the below pattern:
487
+
488
+
```javascript
489
+
<usertag>TAGGED_USER_ID</usertag>
490
+
```
491
+
492
+
This will make the tag clickable inside a message. Ex: [message tag content](#messages-collection-inside-a-room-document)<br>
493
+
`send-message` and `edit-message` events will handle that pattern for you and pass it in the `content` param.
494
+
495
+
(4) `menu-action-handler` is the result of the [`menu-actions`](#props-api) prop.<br>
496
+
When clicking a button from your `menu-actions` array, `menu-action-handler` will give you the name of the button that was click.
(4) `message-action-handler` is the result of the `message-actions` prop.<br>
512
+
(5) `message-action-handler` is the result of the `message-actions` prop.<br>
607
513
When clicking a message menu button from your `message-actions` array, `message-action-handler` will give you the name of the button that was click and the corresponding message data.
(7) `replyMessage` object is available when the user replied to another message by clicking the corresponding icon, and contains the message information that was clicked.
531
+
(8) `replyMessage` object is available when the user replied to another message by clicking the corresponding icon, and contains the message information that was clicked.
626
532
627
533
## Named Slots
628
534
@@ -724,7 +630,7 @@ chatRooms: {
724
630
```javascript
725
631
messages: {
726
632
MESSAGE_ID_1: {
727
-
content:'My first message',
633
+
content:'My first message to <usertag>John</usertag>',
0 commit comments