Fix getUnread query
Booleans are not valid keys in indexeddb. https://www.w3.org/TR/IndexedDB/#dfn-valid-key // FREEBIE
This commit is contained in:
parent
aac9f3ec4c
commit
c4a88dd651
2 changed files with 4 additions and 4 deletions
|
@ -176,7 +176,7 @@
|
||||||
received_at : now,
|
received_at : now,
|
||||||
conversationId : source,
|
conversationId : source,
|
||||||
type : 'incoming',
|
type : 'incoming',
|
||||||
unread : true
|
unread : 1
|
||||||
});
|
});
|
||||||
|
|
||||||
return message;
|
return message;
|
||||||
|
|
|
@ -56,9 +56,9 @@
|
||||||
return unreadMessages.fetch({
|
return unreadMessages.fetch({
|
||||||
index: {
|
index: {
|
||||||
// 'unread' index
|
// 'unread' index
|
||||||
name: 'unread',
|
name : 'unread',
|
||||||
lower: [conversationId, true],
|
lower : [conversationId],
|
||||||
upper: [conversationId, true]
|
upper : [conversationId, Number.MAX_VALUE],
|
||||||
}
|
}
|
||||||
}).always(function() {
|
}).always(function() {
|
||||||
resolve(unreadMessages);
|
resolve(unreadMessages);
|
||||||
|
|
Loading…
Reference in a new issue