mirror of
https://github.com/sim1222/misskey.git
synced 2025-04-29 02:37:22 +09:00
fix: Per user charts only followers available
This commit is contained in:
parent
4714c207fc
commit
191ce11417
@ -194,6 +194,7 @@ export class NoteCreateService {
|
||||
host: User['host'];
|
||||
isSilenced: User['isSilenced'];
|
||||
createdAt: User['createdAt'];
|
||||
followersCount: User['followersCount'];
|
||||
}, data: Option, silent = false): Promise<Note> {
|
||||
// チャンネル外にリプライしたら対象のスコープに合わせる
|
||||
// (クライアントサイドでやっても良い処理だと思うけどとりあえずサーバーサイドで)
|
||||
@ -409,10 +410,14 @@ export class NoteCreateService {
|
||||
host: User['host'];
|
||||
isSilenced: User['isSilenced'];
|
||||
createdAt: User['createdAt'];
|
||||
followersCount: User['followersCount'];
|
||||
}, data: Option, silent: boolean, tags: string[], mentionedUsers: MinimumUser[]) {
|
||||
// 統計を更新
|
||||
this.notesChart.update(note, true);
|
||||
|
||||
if (user.followersCount) {
|
||||
this.perUserNotesChart.update(user, note, true);
|
||||
}
|
||||
|
||||
// Register host
|
||||
if (this.userEntityService.isRemoteUser(user)) {
|
||||
|
@ -48,7 +48,7 @@ export class NoteDeleteService {
|
||||
* @param user 投稿者
|
||||
* @param note 投稿
|
||||
*/
|
||||
async delete(user: { id: User['id']; uri: User['uri']; host: User['host']; }, note: Note, quiet = false) {
|
||||
async delete(user: { id: User['id']; uri: User['uri']; host: User['host']; followersCount: User['followersCount']; }, note: Note, quiet = false) {
|
||||
const deletedAt = new Date();
|
||||
|
||||
// この投稿を除く指定したユーザーによる指定したノートのリノートが存在しないとき
|
||||
@ -96,7 +96,10 @@ export class NoteDeleteService {
|
||||
|
||||
// 統計を更新
|
||||
this.notesChart.update(note, false);
|
||||
|
||||
if (user.followersCount) {
|
||||
this.perUserNotesChart.update(user, note, false);
|
||||
}
|
||||
|
||||
if (this.userEntityService.isRemoteUser(user)) {
|
||||
this.federatedInstanceService.registerOrFetchInstanceDoc(user.host).then(i => {
|
||||
|
@ -81,7 +81,7 @@ export class ReactionService {
|
||||
) {
|
||||
}
|
||||
|
||||
public async create(user: { id: User['id']; host: User['host']; }, note: Note, reaction?: string) {
|
||||
public async create(user: { id: User['id']; host: User['host']; followersCount: User['followersCount']; }, note: Note, reaction?: string) {
|
||||
// Check blocking
|
||||
if (note.userId !== user.id) {
|
||||
const block = await this.blockingsRepository.findOneBy({
|
||||
@ -142,7 +142,9 @@ export class ReactionService {
|
||||
.where('id = :id', { id: note.id })
|
||||
.execute();
|
||||
|
||||
if (user.followersCount) {
|
||||
this.perUserReactionsChart.update(user, note);
|
||||
}
|
||||
|
||||
// カスタム絵文字リアクションだったら絵文字情報も送る
|
||||
const decodedReaction = this.decodeReaction(reaction);
|
||||
|
Loading…
x
Reference in New Issue
Block a user