Add patches by ShittyKopper, Wait No, Allow proxying of videos and audio, add sharkey migration script

This commit is contained in:
Crimekillz 2024-03-30 21:40:53 +01:00
parent fa1fbbeff7
commit 3cf121bf5c
4 changed files with 1064 additions and 5 deletions

1061
docs/sharkey.sql Normal file

File diff suppressed because it is too large Load Diff

View File

@ -54,7 +54,7 @@ searchUser: "Nach einem Nutzer suchen"
reply: "Antworten" reply: "Antworten"
loadMore: "Mehr laden" loadMore: "Mehr laden"
showMore: "Mehr anzeigen" showMore: "Mehr anzeigen"
showLess: "Schließen" showLess: "Warte, nein"
youGotNewFollower: "folgt dir" youGotNewFollower: "folgt dir"
receiveFollowRequest: "Follow-Anfrage erhalten" receiveFollowRequest: "Follow-Anfrage erhalten"
followRequestAccepted: "Follow-Anfrage akzeptiert" followRequestAccepted: "Follow-Anfrage akzeptiert"

View File

@ -65,7 +65,7 @@ newer: "newer"
older: "older" older: "older"
expandAllCws: "Show content for all replies" expandAllCws: "Show content for all replies"
collapseAllCws: "Hide content for all replies" collapseAllCws: "Hide content for all replies"
showLess: "Show less" showLess: "Wait no"
youGotNewFollower: "followed you" youGotNewFollower: "followed you"
receiveFollowRequest: "Follow request received" receiveFollowRequest: "Follow request received"
followRequestAccepted: "Follow request accepted" followRequestAccepted: "Follow request accepted"

View File

@ -112,9 +112,7 @@ export async function proxyMedia(ctx: Koa.Context) {
}; };
} else if (mime === "image/svg+xml") { } else if (mime === "image/svg+xml") {
image = await convertToWebp(path, 2048, 2048, 1); image = await convertToWebp(path, 2048, 2048, 1);
} else if ( } else if (!FILE_TYPE_BROWSERSAFE.includes(mime)) {
!(mime.startsWith("image/") && FILE_TYPE_BROWSERSAFE.includes(mime))
) {
throw new StatusError("Rejected type", 403, "Rejected type"); throw new StatusError("Rejected type", 403, "Rejected type");
} else { } else {
image = { image = {