Show messages to streams we were just subscribed to

(imported from commit f852be239da1f3385f9fc9861a3ed07a7f47a6da)
This commit is contained in:
Leo Franchi 2013-02-21 09:20:54 -05:00
parent 382f94b5b5
commit 36d953e2af
1 changed files with 12 additions and 1 deletions

View File

@ -122,7 +122,18 @@ exports.parse = function (str) {
};
exports.in_home = function (message) {
return message.type === "private" || subs.have(message.display_recipient).in_home_view;
if (message.type === "private") {
return true;
}
// If we don't know about this stream for some reason,
// we might not have loaded the in_home_view information
// yet so show it
if (subs.have(message.display_recipient)) {
return subs.have(message.display_recipient).in_home_view;
} else {
return true;
}
};
// Build a filter function from a list of operators.