mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-26 22:43:08 +02:00
fix: decrement happening on normal renotes
This commit is contained in:
parent
1608e32ed7
commit
9eb094aeb9
1 changed files with 4 additions and 4 deletions
|
@ -115,19 +115,19 @@ export class NoteDeleteService {
|
||||||
this.perUserNotesChart.update(user, note, false);
|
this.perUserNotesChart.update(user, note, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (note.renote && note.text) {
|
if (note.renoteId && note.text) {
|
||||||
// Decrement notes count (user)
|
// Decrement notes count (user)
|
||||||
this.decNotesCountOfUser(user);
|
this.decNotesCountOfUser(user);
|
||||||
} else if (!note.renote) {
|
} else if (!note.renoteId) {
|
||||||
// Decrement notes count (user)
|
// Decrement notes count (user)
|
||||||
this.decNotesCountOfUser(user);
|
this.decNotesCountOfUser(user);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.userEntityService.isRemoteUser(user)) {
|
if (this.userEntityService.isRemoteUser(user)) {
|
||||||
this.federatedInstanceService.fetch(user.host).then(async i => {
|
this.federatedInstanceService.fetch(user.host).then(async i => {
|
||||||
if (note.renote && note.text) {
|
if (note.renoteId && note.text) {
|
||||||
this.instancesRepository.decrement({ id: i.id }, 'notesCount', 1);
|
this.instancesRepository.decrement({ id: i.id }, 'notesCount', 1);
|
||||||
} else if (!note.renote) {
|
} else if (!note.renoteId) {
|
||||||
this.instancesRepository.decrement({ id: i.id }, 'notesCount', 1);
|
this.instancesRepository.decrement({ id: i.id }, 'notesCount', 1);
|
||||||
}
|
}
|
||||||
if ((await this.metaService.fetch()).enableChartsForFederatedInstances) {
|
if ((await this.metaService.fetch()).enableChartsForFederatedInstances) {
|
||||||
|
|
Loading…
Reference in a new issue