Insert pill onClick of timeline profile

When clicking someone in the timeline, insert a user pill instead of the plaintext "displayname:"
This commit is contained in:
Luke Barnard
2017-07-20 15:46:36 +01:00
parent 563f5f7bac
commit 0419eff230
3 changed files with 16 additions and 9 deletions
+2 -2
View File
@@ -357,10 +357,10 @@ module.exports = withMatrixClient(React.createClass({
},
onSenderProfileClick: function(event) {
var mxEvent = this.props.mxEvent;
const mxEvent = this.props.mxEvent;
dis.dispatch({
action: 'insert_displayname',
displayname: (mxEvent.sender ? mxEvent.sender.name : mxEvent.getSender()).replace(' (IRC)', ''),
user_id: mxEvent.getSender(),
});
},