[Gekidou] Add is_unread to MyChannel model (#5878)

* Make message_count become has_unreads

* Fix lint

* Re-add the message count

* rename has_unreads to is_unread and address feedback

* fix query with is_unread

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
This commit is contained in:
Daniel Espino García
2021-12-22 13:37:14 +01:00
committed by GitHub
parent 7e6248dfb3
commit b49b4050ac
10 changed files with 38 additions and 29 deletions

View File

@@ -15,6 +15,7 @@ export default tableSchema({
{name: 'manually_unread', type: 'boolean'},
{name: 'mentions_count', type: 'number'},
{name: 'message_count', type: 'number'},
{name: 'is_unread', type: 'boolean'},
{name: 'roles', type: 'string'},
{name: 'viewed_at', type: 'number'},
],

View File

@@ -116,6 +116,7 @@ describe('*** Test schema for SERVER database ***', () => {
manually_unread: {name: 'manually_unread', type: 'boolean'},
mentions_count: {name: 'mentions_count', type: 'number'},
message_count: {name: 'message_count', type: 'number'},
is_unread: {name: 'is_unread', type: 'boolean'},
roles: {name: 'roles', type: 'string'},
viewed_at: {name: 'viewed_at', type: 'number'},
},
@@ -125,6 +126,7 @@ describe('*** Test schema for SERVER database ***', () => {
{name: 'manually_unread', type: 'boolean'},
{name: 'mentions_count', type: 'number'},
{name: 'message_count', type: 'number'},
{name: 'is_unread', type: 'boolean'},
{name: 'roles', type: 'string'},
{name: 'viewed_at', type: 'number'},
],