changed: moved thread types to channel/threads

This commit is contained in:
ITOH
2021-05-01 23:36:17 +02:00
parent d60ccae805
commit 8840ed5662
8 changed files with 23 additions and 0 deletions
@@ -0,0 +1,10 @@
export interface ThreadMember {
/** The id of the thread */
id: string;
/** The id of the user */
userId: string;
/** The time the current user last joined the thread */
joinTimestamp: string;
/** Any user-thread settings, currently only used for notifications */
flags: number;
}
@@ -0,0 +1,13 @@
export interface ThreadMetadata {
/** Whether the thread is archived */
archived: boolean;
/** Id of the user that last archived or unarchived the thread */
archiverId?: string;
/** Duration in minutes to automatically archive the thread after recent activity */
autoArchiveDuration: 60 | 1440 | 4320 | 10080;
// TODO(threads): channel struct should convert this to a unixx
/** Timestamp when the thread's archive status was last changed, used for calculating recent activity */
archiveTimestamp: string;
/** When a thread is locked, only users with `MANAGE_THREADS` can unarchive it */
locked?: boolean;
}