@@ -39,6 +39,7 @@ import { Action } from "../../../dispatcher/actions";
39
39
import ReportEventDialog from '../dialogs/ReportEventDialog' ;
40
40
import ViewSource from '../../structures/ViewSource' ;
41
41
import { createRedactEventDialog } from '../dialogs/ConfirmRedactDialog' ;
42
+ import ReactionsDialog from '../dialogs/ReactionsDialog' ;
42
43
import ShareDialog from '../dialogs/ShareDialog' ;
43
44
import { RoomPermalinkCreator } from "../../../utils/permalinks/Permalinks" ;
44
45
import { ChevronFace , IPosition } from '../../structures/ContextMenu' ;
@@ -81,6 +82,7 @@ interface IProps extends IPosition {
81
82
relationType : string ,
82
83
eventType : string
83
84
) => Relations ;
85
+ reactions ?: Relations ;
84
86
}
85
87
86
88
interface IState {
@@ -169,6 +171,14 @@ export default class MessageContextMenu extends React.Component<IProps, IState>
169
171
this . closeMenu ( ) ;
170
172
} ;
171
173
174
+ private onReactionsClick = ( ) : void => {
175
+ Modal . createTrackedDialog ( 'Reactions' , '' , ReactionsDialog , {
176
+ mxEvent : this . props . mxEvent ,
177
+ reactions : this . props . reactions ,
178
+ } , 'mx_Dialog_viewsource' ) ;
179
+ this . closeMenu ( ) ;
180
+ } ;
181
+
172
182
private onRedactClick = ( ) : void => {
173
183
const { mxEvent, onCloseDialog } = this . props ;
174
184
createRedactEventDialog ( {
@@ -367,6 +377,14 @@ export default class MessageContextMenu extends React.Component<IProps, IState>
367
377
/>
368
378
) ;
369
379
380
+ const reactionsButton = (
381
+ < IconizedContextMenuOption
382
+ iconClassName = "mx_MessageContextMenu_iconEmoji"
383
+ label = { _t ( "Reactions" ) }
384
+ onClick = { this . onReactionsClick }
385
+ />
386
+ ) ;
387
+
370
388
if ( this . props . eventTileOps ) {
371
389
if ( this . props . eventTileOps . isWidgetHidden ( ) ) {
372
390
unhidePreviewButton = (
@@ -491,6 +509,7 @@ export default class MessageContextMenu extends React.Component<IProps, IState>
491
509
{ externalURLButton }
492
510
{ unhidePreviewButton }
493
511
{ viewSourceButton }
512
+ { reactionsButton }
494
513
{ resendReactionsButton }
495
514
{ collapseReplyChain }
496
515
</ IconizedContextMenuOptionList >
0 commit comments