* Adds threads in team database table and handlers DM/GM channels have no team ID. This makes it troublesome to paginate threads in a team. The issue is that whenever a DM/GM thread is fetched from pagination it will be added in all teams in that server, potentially creating gaps in between threads for those teams. This PR inserts a new table in the DB ThreadsInTeam which will hold references of threads loaded in which server. Thread lists then would have to rely on that table to show threads. Co-authored-by: Elias Nahum <nahumhbl@gmail.com> Co-authored-by: Avinash Lingaloo <avinashlng1080@gmail.com>
16 lines
460 B
TypeScript
16 lines
460 B
TypeScript
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
|
|
import {tableSchema} from '@nozbe/watermelondb';
|
|
|
|
import {MM_TABLES} from '@constants/database';
|
|
|
|
const {THREADS_IN_TEAM} = MM_TABLES.SERVER;
|
|
|
|
export default tableSchema({
|
|
name: THREADS_IN_TEAM,
|
|
columns: [
|
|
{name: 'team_id', type: 'string', isIndexed: true},
|
|
{name: 'thread_id', type: 'string', isIndexed: true},
|
|
],
|
|
});
|