Migrate ChannelRecipient*Event to satisfies, part of #1577

This commit is contained in:
Rory&
2026-03-08 16:30:59 +01:00
parent 0aa1c7c5b7
commit 76f060d656
4 changed files with 11 additions and 9 deletions
@@ -61,13 +61,15 @@ router.put(
event: "CHANNEL_RECIPIENT_ADD",
data: {
channel_id: channel_id,
user: await User.findOneOrFail({
where: { id: user_id },
select: PublicUserProjection,
}),
user: (
await User.findOneOrFail({
where: { id: user_id },
select: PublicUserProjection,
})
).toPublicUser(),
},
channel_id: channel_id,
} as ChannelRecipientAddEvent);
} satisfies ChannelRecipientAddEvent);
return res.sendStatus(204);
}
},
+1 -1
View File
@@ -104,7 +104,7 @@ router.post(
channel_id: channel.id,
},
channel_id: channel.id,
} as ChannelRecipientRemoveEvent);
} satisfies ChannelRecipientRemoveEvent);
console.log(`[Instance ban] Removed user ${user.id} from group channel ${channel.id}`);
}