mirror of
https://codeberg.org/yeentown/barkey.git
synced 2025-05-02 11:36:58 +00:00
fix type errors in NoteCreateService.ts
This commit is contained in:
parent
c54b6bf55d
commit
5c86929b58
1 changed files with 3 additions and 21 deletions
|
@ -228,13 +228,7 @@ export class NoteCreateService implements OnApplicationShutdown {
|
||||||
}
|
}
|
||||||
|
|
||||||
@bindThis
|
@bindThis
|
||||||
public async create(user: {
|
public async create(user: MiUser, data: Option, silent = false): Promise<MiNote> {
|
||||||
id: MiUser['id'];
|
|
||||||
username: MiUser['username'];
|
|
||||||
host: MiUser['host'];
|
|
||||||
isBot: MiUser['isBot'];
|
|
||||||
noindex: MiUser['noindex'];
|
|
||||||
}, data: Option, silent = false): Promise<MiNote> {
|
|
||||||
// チャンネル外にリプライしたら対象のスコープに合わせる
|
// チャンネル外にリプライしたら対象のスコープに合わせる
|
||||||
// (クライアントサイドでやっても良い処理だと思うけどとりあえずサーバーサイドで)
|
// (クライアントサイドでやっても良い処理だと思うけどとりあえずサーバーサイドで)
|
||||||
if (data.reply && data.channel && data.reply.channelId !== data.channel.id) {
|
if (data.reply && data.channel && data.reply.channelId !== data.channel.id) {
|
||||||
|
@ -435,13 +429,7 @@ export class NoteCreateService implements OnApplicationShutdown {
|
||||||
}
|
}
|
||||||
|
|
||||||
@bindThis
|
@bindThis
|
||||||
public async import(user: {
|
public async import(user: MiUser, data: Option): Promise<MiNote> {
|
||||||
id: MiUser['id'];
|
|
||||||
username: MiUser['username'];
|
|
||||||
host: MiUser['host'];
|
|
||||||
isBot: MiUser['isBot'];
|
|
||||||
noindex: MiUser['noindex'];
|
|
||||||
}, data: Option): Promise<MiNote> {
|
|
||||||
return this.create(user, data, true);
|
return this.create(user, data, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -552,13 +540,7 @@ export class NoteCreateService implements OnApplicationShutdown {
|
||||||
}
|
}
|
||||||
|
|
||||||
@bindThis
|
@bindThis
|
||||||
private async postNoteCreated(note: MiNote, user: {
|
private async postNoteCreated(note: MiNote, user: MiUser, data: Option, silent: boolean, tags: string[], mentionedUsers: MinimumUser[]) {
|
||||||
id: MiUser['id'];
|
|
||||||
username: MiUser['username'];
|
|
||||||
host: MiUser['host'];
|
|
||||||
isBot: MiUser['isBot'];
|
|
||||||
noindex: MiUser['noindex'];
|
|
||||||
}, data: Option, silent: boolean, tags: string[], mentionedUsers: MinimumUser[]) {
|
|
||||||
this.notesChart.update(note, true);
|
this.notesChart.update(note, true);
|
||||||
if (note.visibility !== 'specified' && (this.meta.enableChartsForRemoteUser || (user.host == null))) {
|
if (note.visibility !== 'specified' && (this.meta.enableChartsForRemoteUser || (user.host == null))) {
|
||||||
this.perUserNotesChart.update(user, note, true);
|
this.perUserNotesChart.update(user, note, true);
|
||||||
|
|
Loading…
Add table
Reference in a new issue