This commit is contained in:
syuilo 2025-04-03 15:14:09 +09:00
parent b5484276cb
commit 30b7795834
4 changed files with 7 additions and 6 deletions

View File

@ -72,7 +72,7 @@ export const packedChatMessageSchema = {
},
user: {
type: 'object',
optional: true, nullable: true,
optional: false, nullable: false,
ref: 'UserLite',
},
},

View File

@ -57,6 +57,7 @@ import * as Misskey from 'misskey-js';
import { url } from '@@/js/config.js';
import { isLink } from '@@/js/is-link.js';
import type { MenuItem } from '@/types/menu.js';
import type { NormalizedChatMessage } from './room.vue';
import { extractUrlFromMfm } from '@/utility/extract-url-from-mfm.js';
import MkUrlPreview from '@/components/MkUrlPreview.vue';
import { ensureSignin } from '@/i.js';
@ -76,7 +77,7 @@ import { getHTMLElementOrNull } from '@/utility/get-dom-node-or-null.js';
const $i = ensureSignin();
const props = defineProps<{
message: Misskey.entities.ChatMessageLite | Misskey.entities.ChatMessage;
message: NormalizedChatMessage | Misskey.entities.ChatMessage;
isSearchResult?: boolean;
}>();

View File

@ -110,7 +110,7 @@ const props = defineProps<{
roomId?: string;
}>();
type NormalizedChatMessage = Omit<Misskey.entities.ChatMessageLite, 'fromUser' | 'reactions'> & {
export type NormalizedChatMessage = Omit<Misskey.entities.ChatMessageLite, 'fromUser' | 'reactions'> & {
fromUser: Misskey.entities.UserLite;
reactions: (Misskey.entities.ChatMessageLite['reactions'][number] & {
user: Misskey.entities.UserLite;

View File

@ -5389,10 +5389,10 @@ export type components = {
fileId?: string | null;
file?: components['schemas']['DriveFile'] | null;
isRead?: boolean;
reactions: ({
reactions: {
reaction: string;
user?: components['schemas']['UserLite'] | null;
})[];
user: components['schemas']['UserLite'];
}[];
};
ChatMessageLite: {
id: string;