[Gekidou MM-41093] CRT - WS Events, Actions, Queries, Thread Follow, Post Query (#6075)

* WS Events, Actions, Queries, Thread Follow, Post Query

* i18n changes

* Misc

* Only unread threads are marked as read

* Mark threads from WS even as visible in Global threads

* Merge fixes

* Update thread_post_list.tsx

* Merge fix

* Feedback fix

* Make teamId in handleThreads optional for unfollowed threads

* Removed unwated type and return

* Review changes

* Removing unused model

* Merge fix

* Misc fixes

* Following button query change
This commit is contained in:
Anurag Shivarathri
2022-04-04 19:55:13 +05:30
committed by GitHub
parent d1322e84ce
commit 8d6fc41dd5
40 changed files with 1147 additions and 117 deletions

View File

@@ -91,11 +91,12 @@ export type HandlePostsArgs = {
export type HandleThreadsArgs = {
threads: Thread[];
prepareRecordsOnly?: boolean;
teamId: string;
teamId?: string;
};
export type HandleThreadParticipantsArgs = {
prepareRecordsOnly: boolean;
skipSync?: boolean;
threadsParticipants: ParticipantsPerThread[];
};
@@ -113,6 +114,7 @@ export type SanitizeReactionsArgs = {
export type SanitizeThreadParticipantsArgs = {
database: Database;
skipSync?: boolean;
thread_id: $ID<Thread>;
rawParticipants: ThreadParticipant[];
}

View File

@@ -35,6 +35,9 @@ export default class ThreadModel extends Model {
/** unread_mentions : The number of mentions that are not read by the user. */
unreadMentions: number;
/** viewed_at : The timestamp showing when the user's last opened this thread (this is used for the new line message indicator) */
viewedAt: number;
/** participants: All the participants of the thread */
participants: Query<ThreadParticipantsModel>;