mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-12-04 05:24:59 +01:00
improve type
This commit is contained in:
parent
d97fc9ce4e
commit
28f7e48dc6
1 changed files with 4 additions and 4 deletions
|
@ -10,7 +10,7 @@ export default class extends Channel {
|
||||||
public static requireCredential = true;
|
public static requireCredential = true;
|
||||||
|
|
||||||
private otherpartyId: string | null;
|
private otherpartyId: string | null;
|
||||||
private otherparty?: User;
|
private otherparty: User | null;
|
||||||
private groupId: string | null;
|
private groupId: string | null;
|
||||||
private subCh: string;
|
private subCh: string;
|
||||||
private typers: Record<User['id'], Date> = {};
|
private typers: Record<User['id'], Date> = {};
|
||||||
|
@ -18,9 +18,9 @@ export default class extends Channel {
|
||||||
|
|
||||||
@autobind
|
@autobind
|
||||||
public async init(params: any) {
|
public async init(params: any) {
|
||||||
this.otherpartyId = params.otherparty as string;
|
this.otherpartyId = params.otherparty;
|
||||||
this.otherparty = await Users.findOne({ id: this.otherpartyId });
|
this.otherparty = this.otherpartyId ? await Users.findOneOrFail({ id: this.otherpartyId }) : null;
|
||||||
this.groupId = params.group as string;
|
this.groupId = params.group;
|
||||||
|
|
||||||
// Check joining
|
// Check joining
|
||||||
if (this.groupId) {
|
if (this.groupId) {
|
||||||
|
|
Loading…
Reference in a new issue