mirror of
https://github.com/versia-pub/server.git
synced 2026-01-26 12:16:01 +01:00
fix(api): 🐛 Fix reblog notifications not having proper notes attached
This commit is contained in:
parent
ce0cfb4152
commit
b37921d0a3
|
|
@ -148,7 +148,7 @@ describe(meta.route, () => {
|
|||
|
||||
const objects = (await response.json()) as APINotification[];
|
||||
|
||||
expect(objects.length).toBe(3);
|
||||
expect(objects.length).toBe(2);
|
||||
// There should be no element with a status with id of timeline[0].id
|
||||
expect(objects).not.toContainEqual(
|
||||
expect.objectContaining({
|
||||
|
|
|
|||
|
|
@ -75,12 +75,12 @@ export default apiRoute<typeof meta, typeof schema>(
|
|||
}
|
||||
|
||||
// Create notification for reblog if reblogged user is on the same instance
|
||||
if (foundStatus.getAuthor().instanceId === user.instanceId) {
|
||||
if (foundStatus.getAuthor().isLocal() && user.isLocal()) {
|
||||
await db.insert(Notifications).values({
|
||||
accountId: user.id,
|
||||
notifiedId: foundStatus.getAuthor().id,
|
||||
type: "reblog",
|
||||
noteId: foundStatus.getStatus().reblogId,
|
||||
noteId: newReblog.reblogId,
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue