Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
noridev committed Sep 21, 2023
1 parent dd30d68 commit 869e89a
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,19 @@ import type { MiUserGroup } from '@/models/entities/UserGroup.js';
import { GetterService } from '@/server/api/GetterService.js';
import { MessagingService } from '@/core/MessagingService.js';
import { DI } from '@/di-symbols.js';
import { MAX_NOTE_TEXT_LENGTH } from '@/const.js';
import { ApiError } from '../../../error.js';

export const meta = {
tags: ['messaging'],

requireCredential: true,

limit: {
duration: ms('1hour'),
max: 120,
},

requireCredential: true,

kind: 'write:messaging',

res: {
Expand Down Expand Up @@ -82,7 +83,7 @@ export const paramDef = {
properties: {
userId: { type: 'string', format: 'misskey:id' },
groupId: { type: 'string', format: 'misskey:id' },
text: { type: 'string', nullable: true, maxLength: 3000 },
text: { type: 'string', maxLength: MAX_NOTE_TEXT_LENGTH, nullable: true },
fileId: { type: 'string', format: 'misskey:id' },
},
anyOf: [
Expand Down Expand Up @@ -110,8 +111,8 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
private messagingService: MessagingService,
) {
super(meta, paramDef, async (ps, me) => {
let recipientUser: MiUser | null;
let recipientGroup: MiUserGroup | null;
let recipientUser: MiUser | undefined = undefined;
let recipientGroup: MiUserGroup | undefined = undefined;

if (ps.userId != null) {
// Myself
Expand Down

0 comments on commit 869e89a

Please sign in to comment.