Skip to content

Commit 4a0bd84

Browse files
committed
(events) pass room data to roomInfo event
1 parent 1dc3e75 commit 4a0bd84

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ messages="[
412412
| messageActionHandler (3) | `{ roomId, action, message }` | A user clicks on the dropdown icon inside a message |
413413
| sendMessageReaction | `{ roomId, messageId, reaction, remove }` | A user clicks on the emoji icon inside a message |
414414
| typingMessage | `{ message, roomId }` | A user is typing a message |
415-
| roomInfo | - | A user has clicked the room header bar |
415+
| roomInfo | `{ room }` | A user has clicked the room header bar |
416416

417417
(1) `fetchMessages` is triggered every time a room is opened. If the room is opened for the first time, the `options` param will hold `reset: true`
418418

src/ChatWindow/ChatWindow.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ export default {
197197
if (this.isMobile) this.showRoomsList = false
198198
},
199199
roomInfo() {
200-
this.$emit('roomInfo')
200+
this.$emit('roomInfo', this.room)
201201
},
202202
addRoom() {
203203
this.$emit('addRoom')

src/ChatWindow/Room.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<div
1414
class="info-wrapper"
1515
:class="{ 'item-clickable': roomInfo }"
16-
@click="$emit('roomInfo')"
16+
@click="$emit('roomInfo', room)"
1717
>
1818
<div
1919
v-if="room.avatar"

0 commit comments

Comments
 (0)