fix: Initials do not display on notification avatars (#5803)
This commit is contained in:
@@ -3,10 +3,11 @@ import { computed, observable } from "mobx";
|
||||
import { now } from "mobx-utils";
|
||||
import type { ProsemirrorData } from "@shared/types";
|
||||
import User from "~/models/User";
|
||||
import BaseModel from "./BaseModel";
|
||||
import Model from "./base/Model";
|
||||
import Field from "./decorators/Field";
|
||||
import Relation from "./decorators/Relation";
|
||||
|
||||
class Comment extends BaseModel {
|
||||
class Comment extends Model {
|
||||
/**
|
||||
* Map to keep track of which users are currently typing a reply in this
|
||||
* comments thread.
|
||||
@@ -40,18 +41,16 @@ class Comment extends BaseModel {
|
||||
@observable
|
||||
documentId: string;
|
||||
|
||||
createdAt: string;
|
||||
|
||||
@Relation(() => User)
|
||||
createdBy: User;
|
||||
|
||||
createdById: string;
|
||||
|
||||
resolvedAt: string;
|
||||
|
||||
@Relation(() => User)
|
||||
resolvedBy: User;
|
||||
|
||||
updatedAt: string;
|
||||
|
||||
/**
|
||||
* An array of users that are currently typing a reply in this comments thread.
|
||||
*/
|
||||
@@ -60,7 +59,7 @@ class Comment extends BaseModel {
|
||||
return Array.from(this.typingUsers.entries())
|
||||
.filter(([, lastReceivedDate]) => lastReceivedDate > subSeconds(now(), 3))
|
||||
.map(([userId]) => this.store.rootStore.users.get(userId))
|
||||
.filter(Boolean);
|
||||
.filter(Boolean) as User[];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user