mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 05:49:16 +01:00
fix(federation): 🔒 Enforce content filters for remote content as well
This commit is contained in:
parent
c737aeba8e
commit
710f965144
2 changed files with 70 additions and 9 deletions
|
|
@ -500,9 +500,14 @@ export class Note extends BaseInterface<typeof Notes, NoteTypeWithRelations> {
|
|||
);
|
||||
|
||||
const emojis = await Promise.all(
|
||||
extensions?.["pub.versia:custom_emojis"]?.emojis.map((emoji) =>
|
||||
Emoji.fetchFromRemote(emoji, instance),
|
||||
) ?? [],
|
||||
extensions?.["pub.versia:custom_emojis"]?.emojis
|
||||
.filter(
|
||||
(e) =>
|
||||
!config.validation.filters.emoji_shortcode.some(
|
||||
(filter) => filter.test(e.name),
|
||||
),
|
||||
)
|
||||
.map((emoji) => Emoji.fetchFromRemote(emoji, instance)) ?? [],
|
||||
);
|
||||
|
||||
const mentions = (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue