diff --git a/src/skins/vector/views/molecules/EventAsTextTile.js b/src/skins/vector/views/molecules/EventAsTextTile.js index 445303e4..fe79dd3a 100644 --- a/src/skins/vector/views/molecules/EventAsTextTile.js +++ b/src/skins/vector/views/molecules/EventAsTextTile.js @@ -19,22 +19,22 @@ limitations under the License. var React = require('react'); var EventAsTextTileController = require('matrix-react-sdk/lib/controllers/molecules/EventAsTextTile') -var sdk = require('matrix-react-sdk') var TextForEvent = require('matrix-react-sdk/lib/TextForEvent'); module.exports = React.createClass({ displayName: 'EventAsTextTile', mixins: [EventAsTextTileController], - render: function() { - var MessageTimestamp = sdk.getComponent('atoms.MessageTimestamp'); - var MemberAvatar = sdk.getComponent('atoms.MemberAvatar'); + statics: { + needsSenderProfile: function() { + return false; + } + }, + render: function() { var text = TextForEvent.textForEvent(this.props.mxEvent); if (text == null || text.length == 0) return null; - var timestamp = this.props.last ? : null; - var avatar = this.props.mxEvent.sender ? : null; return (
{TextForEvent.textForEvent(this.props.mxEvent)} diff --git a/src/skins/vector/views/molecules/EventTile.js b/src/skins/vector/views/molecules/EventTile.js index a086ad00..e80aa98a 100644 --- a/src/skins/vector/views/molecules/EventTile.js +++ b/src/skins/vector/views/molecules/EventTile.js @@ -114,7 +114,9 @@ module.exports = React.createClass({
); } - sender = ; + if (EventTileType.needsSenderProfile()) { + sender = ; + } } return (
diff --git a/src/skins/vector/views/molecules/MessageTile.js b/src/skins/vector/views/molecules/MessageTile.js index 5e835050..44f5b635 100644 --- a/src/skins/vector/views/molecules/MessageTile.js +++ b/src/skins/vector/views/molecules/MessageTile.js @@ -28,6 +28,12 @@ module.exports = React.createClass({ displayName: 'MessageTile', mixins: [MessageTileController], + statics: { + needsSenderProfile: function() { + return true; + } + }, + render: function() { var UnknownMessageTile = sdk.getComponent('molecules.UnknownMessageTile'); diff --git a/webpack.config.js b/webpack.config.js index 7868699d..929e57d7 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -20,7 +20,8 @@ module.exports = { // removed which gives a tree with matrix-react-sdk and vector // trees smashed together, but this fixes everything being under // various levels of '.' and '..' - return info.resourcePath.replace(/^[\/\.]*/, ''); + // Also, sometimes the resource path is absolute. + return path.relative(process.cwd(), info.resourcePath).replace(/^[\/\.]*/, ''); } }, resolve: {