Skip to content
This repository has been archived by the owner on Jan 13, 2022. It is now read-only.

Commit

Permalink
Merge branch 'hotfix/0.1.0-alpha.7'
Browse files Browse the repository at this point in the history
  • Loading branch information
Tanmay Patel committed Dec 3, 2016
2 parents 8a9e715 + 8b11326 commit f9fe640
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
3 changes: 2 additions & 1 deletion knexfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ module.exports = {
pool: {
min: 2,
max: 10
}
},
debug: true
}, GENERAL_CONFIGS),

production: _.extend({
Expand Down
14 changes: 7 additions & 7 deletions persistance/storage/MessageWithReadReceiptStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class MessageWithReadReceiptStore
.leftJoin(readReceiptStore.TABLE_NAME, function()
{
this.on(`${messageStore.TABLE_NAME}.messageId`, '=', `${readReceiptStore.TABLE_NAME}.messageId`)
.andOn(`${readReceiptStore.TABLE_NAME}.subscriber`, '=', subscriberForReadReceipt);
.andOn(`${readReceiptStore.TABLE_NAME}.subscriber`, '=', knex.raw('?', [subscriberForReadReceipt]));
})
.whereIn(`${messageStore.TABLE_NAME}.messageId`, messageIds)
.orderBy(`${messageStore.TABLE_NAME}.updatedAt`, 'desc')
Expand Down Expand Up @@ -110,7 +110,7 @@ class MessageWithReadReceiptStore
.leftJoin(readReceiptStore.TABLE_NAME, function()
{
this.on(`${messageStore.TABLE_NAME}.messageId`, '=', `${readReceiptStore.TABLE_NAME}.messageId`)
.andOn(`${readReceiptStore.TABLE_NAME}.subscriber`, '=', subscriberForReadReceipt);
.andOn(`${readReceiptStore.TABLE_NAME}.subscriber`, '=', knex.raw('?', [subscriberForReadReceipt]));
})
.whereIn(`${messageStore.TABLE_NAME}.messageId`, messageIds)
.andWhere(`${messageStore.TABLE_NAME}.topicId`, topic.get('topicId'))
Expand Down Expand Up @@ -140,7 +140,7 @@ class MessageWithReadReceiptStore
.leftJoin(readReceiptStore.TABLE_NAME, function()
{
this.on(`${messageStore.TABLE_NAME}.messageId`, '=', `${readReceiptStore.TABLE_NAME}.messageId`)
.andOn(`${readReceiptStore.TABLE_NAME}.subscriber`, '=', subscriberForReadReceipt);
.andOn(`${readReceiptStore.TABLE_NAME}.subscriber`, '=', knex.raw('?', [subscriberForReadReceipt]));
})
.where(`${messageStore.TABLE_NAME}.topicId`, topic.get('topicId'))
.andWhere(`${messageStore.TABLE_NAME}.updatedAt`, '<=', tillTime.toDate())
Expand Down Expand Up @@ -172,7 +172,7 @@ class MessageWithReadReceiptStore
.leftJoin(readReceiptStore.TABLE_NAME, function()
{
this.on(`${messageStore.TABLE_NAME}.messageId`, '=', `${readReceiptStore.TABLE_NAME}.messageId`)
.andOn(`${readReceiptStore.TABLE_NAME}.subscriber`, '=', subscriberForReadReceipt);
.andOn(`${readReceiptStore.TABLE_NAME}.subscriber`, '=', knex.raw('?', [subscriberForReadReceipt]));
})
.where(`${messageStore.TABLE_NAME}.topicId`, topic.get('topicId'))
.andWhere(`${messageStore.TABLE_NAME}.updatedAt`, '>=', sinceTime.toDate())
Expand All @@ -199,7 +199,7 @@ class MessageWithReadReceiptStore
.leftJoin(readReceiptStore.TABLE_NAME, function()
{
this.on(`${messageStore.TABLE_NAME}.messageId`, '=', `${readReceiptStore.TABLE_NAME}.messageId`)
.andOn(`${readReceiptStore.TABLE_NAME}.subscriber`, '=', subscriberForReadReceipt);
.andOn(`${readReceiptStore.TABLE_NAME}.subscriber`, '=', knex.raw('?', [subscriberForReadReceipt]));
})
.where(`${messageStore.TABLE_NAME}.topicId`, topic.get('topicId'))
.andWhere(function()
Expand Down Expand Up @@ -229,7 +229,7 @@ class MessageWithReadReceiptStore
.leftJoin(readReceiptStore.TABLE_NAME, function()
{
this.on(`${messageStore.TABLE_NAME}.messageId`, '=', `${readReceiptStore.TABLE_NAME}.messageId`)
.andOn(`${readReceiptStore.TABLE_NAME}.subscriber`, '=', subscriberForReadReceipt);
.andOn(`${readReceiptStore.TABLE_NAME}.subscriber`, '=', knex.raw('?', [subscriberForReadReceipt]));
})
.where(`${messageStore.TABLE_NAME}.topicId`, topic.get('topicId'))
.andWhere(function()
Expand Down Expand Up @@ -264,7 +264,7 @@ class MessageWithReadReceiptStore
.leftJoin(readReceiptStore.TABLE_NAME, function()
{
this.on(`${messageStore.TABLE_NAME}.messageId`, '=', `${readReceiptStore.TABLE_NAME}.messageId`)
.andOn(`${readReceiptStore.TABLE_NAME}.subscriber`, '=', subscriberForReadReceipt);
.andOn(`${readReceiptStore.TABLE_NAME}.subscriber`, '=', knex.raw('?', [subscriberForReadReceipt]));
})
.where(`${messageStore.TABLE_NAME}.topicId`, topic.get('topicId'))
.orderBy(`${messageStore.TABLE_NAME}.updatedAt`, 'desc')
Expand Down

0 comments on commit f9fe640

Please sign in to comment.