Skip to content

Commit 85748c0

Browse files
committed
Linkify emote tiles
1 parent 58907e5 commit 85748c0

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

‎skins/base/views/molecules/MEmoteTile.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ module.exports = React.createClass({
2929
var content = mxEvent.getContent();
3030
var name = mxEvent.sender ? mxEvent.sender.name : mxEvent.getSender();
3131
return (
32-
<span className="mx_MEmoteTile mx_MessageTile_content">
32+
<span ref="content" className="mx_MEmoteTile mx_MessageTile_content">
3333
* {name} {content.body}
3434
</span>
3535
);

‎src/controllers/molecules/MEmoteTile.js‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,15 @@ limitations under the License.
1616

1717
'use strict';
1818

19+
var linkify = require('linkifyjs');
20+
var linkifyElement = require('linkifyjs/element');
21+
var linkifyMatrix = require('../../linkify-matrix');
22+
23+
linkifyMatrix(linkify);
24+
1925
module.exports = {
26+
componentDidMount: function() {
27+
linkifyElement(this.refs.content.getDOMNode(), linkifyMatrix.options);
28+
}
2029
};
2130

0 commit comments

Comments
 (0)