Don't mark your message as read if it comes from the API

(imported from commit 0570d4db590e21b0fadd544b10c9865fa7acd66b)
This commit is contained in:
Leo Franchi
2013-03-14 14:55:44 -04:00
parent 95c9c6817f
commit 07433b80cc
2 changed files with 7 additions and 2 deletions

View File

@@ -197,7 +197,10 @@ function message_unread(message) {
return false;
}
if (message.sender_email === email) {
var sent_by_human = ['website', 'iphone', 'android']
.indexOf(message.client.toLowerCase()) !== -1;
if (message.sender_email === email && sent_by_human) {
return false;
}