Compare commits
3 commits
8212c62663
...
9052a02598
Author | SHA1 | Date | |
---|---|---|---|
9052a02598 | |||
57c4fef275 | |||
748685e53e |
2 changed files with 4 additions and 4 deletions
|
@ -7,6 +7,7 @@ import { setImmediate } from 'node:timers/promises';
|
|||
import * as mfm from 'mfm-js';
|
||||
import { In, DataSource, IsNull, LessThan } from 'typeorm';
|
||||
import * as Redis from 'ioredis';
|
||||
import * as Bull from 'bullmq';
|
||||
import { Inject, Injectable, OnApplicationShutdown } from '@nestjs/common';
|
||||
import { extractMentions } from '@/misc/extract-mentions.js';
|
||||
import { extractCustomEmojisFromMfm } from '@/misc/extract-custom-emojis-from-mfm.js';
|
||||
|
@ -293,7 +294,7 @@ export class NoteCreateService implements OnApplicationShutdown {
|
|||
case 'followers':
|
||||
// 他人のfollowers noteはreject
|
||||
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にする
|
||||
|
@ -301,7 +302,7 @@ export class NoteCreateService implements OnApplicationShutdown {
|
|||
break;
|
||||
case 'specified':
|
||||
// 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');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -79,7 +79,6 @@ export function markOutgoing<T, L extends 'question' | undefined>(object: T, _ba
|
|||
|
||||
export function yumeNormalizeURL(url: string): string {
|
||||
const u = new URL(url);
|
||||
u.hash = '';
|
||||
u.host = toASCII(u.host);
|
||||
if (u.protocol && u.protocol !== 'https:') {
|
||||
throw new bull.UnrecoverableError('protocol is not https');
|
||||
|
@ -612,7 +611,7 @@ export function yumeDowncastRemove(object: IObject): IRemove | null {
|
|||
export function yumeDowncastLike(object: IObject): ILike | null {
|
||||
if (getApType(object) !== 'Like') return null;
|
||||
const obj = object as ILike;
|
||||
if (!obj.actor || !obj.object || !obj.target) return null;
|
||||
if (!obj.actor || !obj.object) return null;
|
||||
return {
|
||||
...extractMisskeyVendorKeys(object),
|
||||
...extractSafe(object),
|
||||
|
|
Loading…
Reference in a new issue