File tree Expand file tree Collapse file tree 4 files changed +17
-1
lines changed Expand file tree Collapse file tree 4 files changed +17
-1
lines changed Original file line number Diff line number Diff line change 56
56
@edit-message =" editMessage"
57
57
@delete-message =" deleteMessage"
58
58
@open-file =" openFile"
59
+ @open-user-tag =" openUserTag"
59
60
@menu-action-handler =" menuActionHandler"
60
61
@message-action-handler =" messageActionHandler"
61
62
@send-message-reaction =" sendMessageReaction"
@@ -271,6 +272,9 @@ export default {
271
272
openFile ({ message, action }) {
272
273
this .$emit (' open-file' , { message, action })
273
274
},
275
+ openUserTag ({ user }) {
276
+ this .$emit (' open-user-tag' , { user })
277
+ },
274
278
menuActionHandler (ev ) {
275
279
this .$emit (' menu-action-handler' , {
276
280
action: ev,
Original file line number Diff line number Diff line change @@ -74,7 +74,10 @@ export default {
74
74
},
75
75
openTag (message ) {
76
76
if (! this .singleLine && this .checkType (message, ' tag' )) {
77
- // TODO: emit event
77
+ const user = this .users .find (
78
+ u => message .value .indexOf (u .username ) !== - 1
79
+ )
80
+ this .$emit (' open-user-tag' , user)
78
81
}
79
82
}
80
83
}
Original file line number Diff line number Diff line change 78
78
:content =" message.content"
79
79
:users =" roomUsers"
80
80
:text-formatting =" textFormatting"
81
+ @open-user-tag =" openUserTag"
81
82
>
82
83
<template v-slot :deleted-icon =" data " >
83
84
<slot name =" deleted-icon" v-bind =" data" ></slot >
129
130
:content =" message.content"
130
131
:users =" roomUsers"
131
132
:text-formatting =" textFormatting"
133
+ @open-user-tag =" openUserTag"
132
134
></format-message >
133
135
</div >
134
136
@@ -457,6 +459,9 @@ export default {
457
459
openFile (action ) {
458
460
this .$emit (' open-file' , { message: this .message , action })
459
461
},
462
+ openUserTag (user ) {
463
+ this .$emit (' open-user-tag' , { user })
464
+ },
460
465
messageActionHandler (action ) {
461
466
this .closeOptions ()
462
467
this .messageHover = false
Original file line number Diff line number Diff line change 137
137
:hide-options =" hideOptions"
138
138
@message-action-handler =" messageActionHandler"
139
139
@open-file =" openFile"
140
+ @open-user-tag =" openUserTag"
140
141
@add-new-message =" addNewMessage"
141
142
@send-message-reaction =" sendMessageReaction"
142
143
@hide-options =" hideOptions = $event"
@@ -932,6 +933,9 @@ export default {
932
933
openFile ({ message, action }) {
933
934
this .$emit (' open-file' , { message, action })
934
935
},
936
+ openUserTag (user ) {
937
+ this .$emit (' open-user-tag' , { user })
938
+ },
935
939
menuActionHandler (action ) {
936
940
this .closeMenu ()
937
941
this .$emit (' menu-action-handler' , action)
You can’t perform that action at this time.
0 commit comments