diff --git a/packages/backend/src/core/NoteCreateService.ts b/packages/backend/src/core/NoteCreateService.ts index bd04e9e422..eea710066d 100644 --- a/packages/backend/src/core/NoteCreateService.ts +++ b/packages/backend/src/core/NoteCreateService.ts @@ -14,7 +14,8 @@ import { extractCustomEmojisFromMfm } from '@/misc/extract-custom-emojis-from-mf import { extractHashtags } from '@/misc/extract-hashtags.js'; import type { IMentionedRemoteUsers } from '@/models/Note.js'; import { MiNote } from '@/models/Note.js'; -import { MiEvent, IEvent } from '@/models/Event.js'; +import { MiEvent } from '@/models/Event.js'; +import type { IEvent } from '@/models/Event.js'; import type { ChannelFollowingsRepository, ChannelsRepository, FollowingsRepository, InstancesRepository, MiFollowing, MutingsRepository, NotesRepository, NoteThreadMutingsRepository, UserListMembershipsRepository, UserProfilesRepository, UsersRepository } from '@/models/_.js'; import type { MiDriveFile } from '@/models/DriveFile.js'; import type { MiApp } from '@/models/App.js'; diff --git a/packages/backend/src/models/json-schema/note.ts b/packages/backend/src/models/json-schema/note.ts index e11775ae28..cfc0b76cbf 100644 --- a/packages/backend/src/models/json-schema/note.ts +++ b/packages/backend/src/models/json-schema/note.ts @@ -140,6 +140,10 @@ export const packedNoteSchema = { type: 'object', optional: true, nullable: true, }, + event: { + type: 'object', + optional: true, nullable: true, + }, channelId: { type: 'string', optional: true, nullable: true, diff --git a/packages/backend/src/server/api/endpoints/notes.ts b/packages/backend/src/server/api/endpoints/notes.ts index e726f4c29e..2da1784e39 100644 --- a/packages/backend/src/server/api/endpoints/notes.ts +++ b/packages/backend/src/server/api/endpoints/notes.ts @@ -32,6 +32,7 @@ export const paramDef = { renote: { type: 'boolean' }, withFiles: { type: 'boolean' }, poll: { type: 'boolean' }, + event: { type: 'boolean' }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, sinceId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' }, @@ -78,6 +79,10 @@ export default class extends Endpoint { // eslint- query.andWhere(ps.poll ? 'note.hasPoll = TRUE' : 'note.hasPoll = FALSE'); } + if (ps.event !== undefined) { + query.andWhere(ps.event ? 'note.hasEvent = TRUE' : 'note.hasEvent = FALSE'); + } + // TODO //if (bot != undefined) { // query.isBot = bot; diff --git a/packages/cherrypick-js/src/autogen/apiClientJSDoc.ts b/packages/cherrypick-js/src/autogen/apiClientJSDoc.ts index 5cdbbd0b6e..006d923942 100644 --- a/packages/cherrypick-js/src/autogen/apiClientJSDoc.ts +++ b/packages/cherrypick-js/src/autogen/apiClientJSDoc.ts @@ -1,7 +1,7 @@ /* * version: 4.6.0-beta.4 * basedMisskeyVersion: 2023.12.0-beta.4 - * generatedAt: 2023-12-14T11:18:50.362Z + * generatedAt: 2023-12-14T16:00:54.542Z */ import type { SwitchCaseResponseType } from '../api.js'; diff --git a/packages/cherrypick-js/src/autogen/endpoint.ts b/packages/cherrypick-js/src/autogen/endpoint.ts index 44d4c9d7eb..a1b658dccc 100644 --- a/packages/cherrypick-js/src/autogen/endpoint.ts +++ b/packages/cherrypick-js/src/autogen/endpoint.ts @@ -1,7 +1,7 @@ /* * version: 4.6.0-beta.4 * basedMisskeyVersion: 2023.12.0-beta.4 - * generatedAt: 2023-12-14T11:18:50.360Z + * generatedAt: 2023-12-14T16:00:54.540Z */ import type { diff --git a/packages/cherrypick-js/src/autogen/entities.ts b/packages/cherrypick-js/src/autogen/entities.ts index 9df9e731fc..842d6cd00c 100644 --- a/packages/cherrypick-js/src/autogen/entities.ts +++ b/packages/cherrypick-js/src/autogen/entities.ts @@ -1,7 +1,7 @@ /* * version: 4.6.0-beta.4 * basedMisskeyVersion: 2023.12.0-beta.4 - * generatedAt: 2023-12-14T11:18:50.359Z + * generatedAt: 2023-12-14T16:00:54.539Z */ import { operations } from './types.js'; diff --git a/packages/cherrypick-js/src/autogen/models.ts b/packages/cherrypick-js/src/autogen/models.ts index b4d6b706c6..6c5693cbf2 100644 --- a/packages/cherrypick-js/src/autogen/models.ts +++ b/packages/cherrypick-js/src/autogen/models.ts @@ -1,7 +1,7 @@ /* * version: 4.6.0-beta.4 * basedMisskeyVersion: 2023.12.0-beta.4 - * generatedAt: 2023-12-14T11:18:50.358Z + * generatedAt: 2023-12-14T16:00:54.537Z */ import { components } from './types.js'; diff --git a/packages/cherrypick-js/src/autogen/types.ts b/packages/cherrypick-js/src/autogen/types.ts index deaf41cf4e..6c3d6aa6f2 100644 --- a/packages/cherrypick-js/src/autogen/types.ts +++ b/packages/cherrypick-js/src/autogen/types.ts @@ -4,7 +4,7 @@ /* * version: 4.6.0-beta.4 * basedMisskeyVersion: 2023.12.0-beta.4 - * generatedAt: 2023-12-14T11:18:50.281Z + * generatedAt: 2023-12-14T16:00:54.457Z */ /** @@ -4096,6 +4096,7 @@ export type components = { files?: components['schemas']['DriveFile'][]; tags?: string[]; poll?: Record | null; + event?: Record | null; /** * Format: id * @example xxxxxxxxxx @@ -20334,6 +20335,7 @@ export type operations = { renote?: boolean; withFiles?: boolean; poll?: boolean; + event?: boolean; /** @default 10 */ limit?: number; /** Format: misskey:id */ diff --git a/packages/frontend/src/components/MkNote.vue b/packages/frontend/src/components/MkNote.vue index 869fff818f..ace18ba79d 100644 --- a/packages/frontend/src/components/MkNote.vue +++ b/packages/frontend/src/components/MkNote.vue @@ -86,8 +86,8 @@ SPDX-License-Identifier: AGPL-3.0-only :enableEmojiMenuReaction="true" />
- - + +
@@ -103,7 +103,7 @@ SPDX-License-Identifier: AGPL-3.0-only

{{ appearNote.text }}
- +
@@ -154,10 +154,10 @@ SPDX-License-Identifier: AGPL-3.0-only - - @@ -167,13 +167,13 @@ SPDX-License-Identifier: AGPL-3.0-only - - diff --git a/packages/frontend/src/components/MkNoteDetailed.vue b/packages/frontend/src/components/MkNoteDetailed.vue index c198676cd0..4985a5f50d 100644 --- a/packages/frontend/src/components/MkNoteDetailed.vue +++ b/packages/frontend/src/components/MkNoteDetailed.vue @@ -106,8 +106,8 @@ SPDX-License-Identifier: AGPL-3.0-only /> RN:
- - + +
@@ -123,7 +123,7 @@ SPDX-License-Identifier: AGPL-3.0-only

{{ appearNote.text }}
- +
@@ -159,7 +159,7 @@ SPDX-License-Identifier: AGPL-3.0-only v-tooltip="i18n.ts.renote" class="_button" :class="$style.noteFooterButton" - @mousedown="defaultStore.state.renoteQuoteButtonSeparation ? renoteOnly() : renote()" + @click="defaultStore.state.renoteQuoteButtonSeparation ? renoteOnly() : renote()" >

{{ appearNote.renoteCount }}

@@ -167,10 +167,10 @@ SPDX-License-Identifier: AGPL-3.0-only - - @@ -180,10 +180,10 @@ SPDX-License-Identifier: AGPL-3.0-only - - diff --git a/packages/frontend/src/components/MkReactionsViewer.reaction.vue b/packages/frontend/src/components/MkReactionsViewer.reaction.vue index 79c24b702a..6bd1a6e004 100644 --- a/packages/frontend/src/components/MkReactionsViewer.reaction.vue +++ b/packages/frontend/src/components/MkReactionsViewer.reaction.vue @@ -10,9 +10,9 @@ SPDX-License-Identifier: AGPL-3.0-only v-vibrate="defaultStore.state.vibrateSystem ? [10, 30, 40] : []" class="_button" :class="[$style.root, { [$style.reacted]: note.myReaction == reaction, [$style.canToggle]: (canToggle || alternative), [$style.small]: defaultStore.state.reactionsDisplaySize === 'small', [$style.large]: defaultStore.state.reactionsDisplaySize === 'large' }]" - @click="toggleReaction()" + @click="toggleReaction" > - + {{ count }} @@ -56,7 +56,7 @@ const alternative: ComputedRef = computed(() => defaultStore.stat const canToggle = computed(() => !props.reaction.match(/@\w/) && $i); -async function toggleReaction(ev) { +async function toggleReaction(ev: MouseEvent) { if (!canToggle.value) { chooseAlternative(ev); return; diff --git a/packages/frontend/src/components/MkSubNoteContent.vue b/packages/frontend/src/components/MkSubNoteContent.vue index 634beba3ed..4fe2c53fb4 100644 --- a/packages/frontend/src/components/MkSubNoteContent.vue +++ b/packages/frontend/src/components/MkSubNoteContent.vue @@ -21,8 +21,8 @@ SPDX-License-Identifier: AGPL-3.0-only /> RN: ...
- - + +
@@ -38,7 +38,7 @@ SPDX-License-Identifier: AGPL-3.0-only

{{ note.text }}
- +
@@ -88,10 +88,10 @@ SPDX-License-Identifier: AGPL-3.0-only - - @@ -101,13 +101,13 @@ SPDX-License-Identifier: AGPL-3.0-only - -