mirror of
https://activitypub.software/TransFem-org/Sharkey
synced 2024-12-18 22:40:07 +00:00
Apply suggestions
This commit is contained in:
parent
1d0fd4c40b
commit
152cc07483
3 changed files with 9 additions and 4 deletions
|
@ -10,6 +10,7 @@ import { NoteCreateService } from '@/core/NoteCreateService.js';
|
|||
import type { ChannelsRepository, DriveFilesRepository, MiDriveFile, NoteScheduleRepository, NotesRepository, UsersRepository } from '@/models/_.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
import { NotificationService } from '@/core/NotificationService.js';
|
||||
import { IdentifiableError } from '@/misc/identifiable-error.js';
|
||||
import { QueueLoggerService } from '../QueueLoggerService.js';
|
||||
import type * as Bull from 'bullmq';
|
||||
import type { ScheduleNotePostJobData } from '../types.js';
|
||||
|
@ -119,6 +120,12 @@ export class ScheduleNotePostProcessorService {
|
|||
reply,
|
||||
renote,
|
||||
channel,
|
||||
}).catch(async (err: IdentifiableError) => {
|
||||
this.notificationService.createNotification(me.id, 'scheduledNoteFailed', {
|
||||
reason: err.message,
|
||||
});
|
||||
await this.noteScheduleRepository.remove(data);
|
||||
throw this.logger.error(`Schedule Note Failed Reason: ${err.message}`);
|
||||
});
|
||||
await this.noteScheduleRepository.remove(data);
|
||||
this.notificationService.createNotification(me.id, 'scheduledNotePosted', {
|
||||
|
|
|
@ -360,7 +360,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
}, {
|
||||
delay,
|
||||
removeOnComplete: true,
|
||||
jobId: noteId,
|
||||
jobId: `schedNote:${noteId}`,
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -821,7 +821,7 @@ async function post(ev?: MouseEvent) {
|
|||
const filesData = toRaw(files.value);
|
||||
|
||||
const isMissingAltText = filesData.filter(
|
||||
file => file.type.startsWith('image/') || file.type.startsWith('video/') || file.type.startsWith('audio/')
|
||||
file => file.type.startsWith('image/') || file.type.startsWith('video/') || file.type.startsWith('audio/'),
|
||||
).some(file => !file.comment);
|
||||
|
||||
if (isMissingAltText) {
|
||||
|
@ -914,8 +914,6 @@ async function post(ev?: MouseEvent) {
|
|||
claimAchievement('notes1');
|
||||
}
|
||||
|
||||
poll.value = null;
|
||||
|
||||
const text = postData.text ?? '';
|
||||
const lowerCase = text.toLowerCase();
|
||||
if ((lowerCase.includes('love') || lowerCase.includes('❤')) && lowerCase.includes('sharkey')) {
|
||||
|
|
Loading…
Reference in a new issue