[backend/services] Increment Note.RepliesCount on note create
This commit is contained in:
parent
8f8e3f9d1a
commit
9591255220
1 changed files with 2 additions and 0 deletions
|
@ -81,6 +81,7 @@ public class NoteService(
|
|||
};
|
||||
|
||||
user.NotesCount++;
|
||||
if (reply != null) reply.RepliesCount++;
|
||||
await db.AddAsync(note);
|
||||
await db.SaveChangesAsync();
|
||||
await notificationSvc.GenerateMentionNotifications(note, mentionedLocalUserIds);
|
||||
|
@ -208,6 +209,7 @@ public class NoteService(
|
|||
}
|
||||
|
||||
user.NotesCount++;
|
||||
if (dbNote.Reply != null) dbNote.Reply.RepliesCount++;
|
||||
await db.Notes.AddAsync(dbNote);
|
||||
await db.SaveChangesAsync();
|
||||
await notificationSvc.GenerateMentionNotifications(dbNote, mentionedLocalUserIds);
|
||||
|
|
Loading…
Add table
Reference in a new issue