diff --git a/skins/base/css/molecules/MessageTile.css b/skins/base/css/molecules/MessageTile.css index 3e484079..09a995e6 100644 --- a/skins/base/css/molecules/MessageTile.css +++ b/skins/base/css/molecules/MessageTile.css @@ -24,3 +24,7 @@ limitations under the License. .mx_MessageTile.not_sent { color: #f11; } + +.mx_MessageTile.highlight { + color: #00f; +} diff --git a/skins/base/views/molecules/MessageTile.js b/skins/base/views/molecules/MessageTile.js index 80bbc5fd..95f4a9ac 100644 --- a/skins/base/views/molecules/MessageTile.js +++ b/skins/base/views/molecules/MessageTile.js @@ -49,7 +49,8 @@ module.exports = React.createClass({ var classes = classNames({ mx_MessageTile: true, sending: this.props.mxEvent.status == 'sending', - not_sent: this.props.mxEvent.status == 'not_sent' + not_sent: this.props.mxEvent.status == 'not_sent', + highlight: this.shouldHighlight() }); return (
diff --git a/src/controllers/molecules/MessageTile.js b/src/controllers/molecules/MessageTile.js index 8aa688b2..ef56daa2 100644 --- a/src/controllers/molecules/MessageTile.js +++ b/src/controllers/molecules/MessageTile.js @@ -16,6 +16,13 @@ limitations under the License. 'use strict'; +var MatrixClientPeg = require("../../MatrixClientPeg"); + module.exports = { + shouldHighlight: function() { + var actions = this.props.mxEvent.getPushActions(MatrixClientPeg.get()); + if (!actions || !actions.tweaks) { return false; } + return actions.tweaks.highlight; + } };