Merge pull request #113 from matrix-org/dbkr/unread_only_if_have_tile

Don't count as an unread message if we don't have a tile for it.
This commit is contained in:
David Baker 2016-01-26 14:19:45 +00:00
commit fcf6afbe06

View File

@ -15,6 +15,7 @@ limitations under the License.
*/
var MatrixClientPeg = require('./MatrixClientPeg');
var sdk = require('./index');
module.exports = {
/**
@ -27,7 +28,8 @@ module.exports = {
} else if (ev.getType == 'm.room.message' && ev.getContent().msgtype == 'm.notify') {
return false;
}
return true;
var EventTile = sdk.getComponent('rooms.EventTile');
return EventTile.haveTileForEvent(ev);
},
doesRoomHaveUnreadMessages: function(room) {