Merge upstream #40

Merged
yume merged 36 commits from develop into master 2024-11-21 11:40:02 -06:00
2 changed files with 3 additions and 3 deletions
Showing only changes of commit 57c4fef275 - Show all commits

View file

@ -7,6 +7,7 @@ import { setImmediate } from 'node:timers/promises';
import * as mfm from 'mfm-js'; import * as mfm from 'mfm-js';
import { In, DataSource, IsNull, LessThan } from 'typeorm'; import { In, DataSource, IsNull, LessThan } from 'typeorm';
import * as Redis from 'ioredis'; import * as Redis from 'ioredis';
import * as Bull from 'bullmq';
import { Inject, Injectable, OnApplicationShutdown } from '@nestjs/common'; import { Inject, Injectable, OnApplicationShutdown } from '@nestjs/common';
import { extractMentions } from '@/misc/extract-mentions.js'; import { extractMentions } from '@/misc/extract-mentions.js';
import { extractCustomEmojisFromMfm } from '@/misc/extract-custom-emojis-from-mfm.js'; import { extractCustomEmojisFromMfm } from '@/misc/extract-custom-emojis-from-mfm.js';
@ -293,7 +294,7 @@ export class NoteCreateService implements OnApplicationShutdown {
case 'followers': case 'followers':
// 他人のfollowers noteはreject // 他人のfollowers noteはreject
if (data.renote.userId !== user.id) { if (data.renote.userId !== user.id) {
throw new Error('Renote target is not public or home'); throw new Bull.UnrecoverableError('Renote target is not public or home');
} }
// Renote対象がfollowersならfollowersにする // Renote対象がfollowersならfollowersにする
@ -301,7 +302,7 @@ export class NoteCreateService implements OnApplicationShutdown {
break; break;
case 'specified': case 'specified':
// specified / direct noteはreject // specified / direct noteはreject
throw new Error('Renote target is not public or home'); throw new Bull.UnrecoverableError('Renote target is not public or home');
} }
} }

View file

@ -79,7 +79,6 @@ export function markOutgoing<T, L extends 'question' | undefined>(object: T, _ba
export function yumeNormalizeURL(url: string): string { export function yumeNormalizeURL(url: string): string {
const u = new URL(url); const u = new URL(url);
u.hash = '';
u.host = toASCII(u.host); u.host = toASCII(u.host);
if (u.protocol && u.protocol !== 'https:') { if (u.protocol && u.protocol !== 'https:') {
throw new bull.UnrecoverableError('protocol is not https'); throw new bull.UnrecoverableError('protocol is not https');