enhance: チャットルームに招待されたときの通知を追加
This commit is contained in:
parent
2fc3baa988
commit
304d0eb83b
|
@ -9883,6 +9883,10 @@ export interface Locale extends ILocale {
|
||||||
* ロールが付与されました
|
* ロールが付与されました
|
||||||
*/
|
*/
|
||||||
"roleAssigned": string;
|
"roleAssigned": string;
|
||||||
|
/**
|
||||||
|
* チャットルームへ招待されました
|
||||||
|
*/
|
||||||
|
"chatRoomInvitationReceived": string;
|
||||||
/**
|
/**
|
||||||
* プッシュ通知の更新をしました
|
* プッシュ通知の更新をしました
|
||||||
*/
|
*/
|
||||||
|
@ -9992,6 +9996,10 @@ export interface Locale extends ILocale {
|
||||||
* ロールが付与された
|
* ロールが付与された
|
||||||
*/
|
*/
|
||||||
"roleAssigned": string;
|
"roleAssigned": string;
|
||||||
|
/**
|
||||||
|
* チャットルームへ招待された
|
||||||
|
*/
|
||||||
|
"chatRoomInvitationReceived": string;
|
||||||
/**
|
/**
|
||||||
* 実績の獲得
|
* 実績の獲得
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -2612,6 +2612,7 @@ _notification:
|
||||||
newNote: "新しい投稿"
|
newNote: "新しい投稿"
|
||||||
unreadAntennaNote: "アンテナ {name}"
|
unreadAntennaNote: "アンテナ {name}"
|
||||||
roleAssigned: "ロールが付与されました"
|
roleAssigned: "ロールが付与されました"
|
||||||
|
chatRoomInvitationReceived: "チャットルームへ招待されました"
|
||||||
emptyPushNotificationMessage: "プッシュ通知の更新をしました"
|
emptyPushNotificationMessage: "プッシュ通知の更新をしました"
|
||||||
achievementEarned: "実績を獲得"
|
achievementEarned: "実績を獲得"
|
||||||
testNotification: "通知テスト"
|
testNotification: "通知テスト"
|
||||||
|
@ -2641,6 +2642,7 @@ _notification:
|
||||||
receiveFollowRequest: "フォロー申請を受け取った"
|
receiveFollowRequest: "フォロー申請を受け取った"
|
||||||
followRequestAccepted: "フォローが受理された"
|
followRequestAccepted: "フォローが受理された"
|
||||||
roleAssigned: "ロールが付与された"
|
roleAssigned: "ロールが付与された"
|
||||||
|
chatRoomInvitationReceived: "チャットルームへ招待された"
|
||||||
achievementEarned: "実績の獲得"
|
achievementEarned: "実績の獲得"
|
||||||
exportCompleted: "エクスポートが完了した"
|
exportCompleted: "エクスポートが完了した"
|
||||||
login: "ログイン"
|
login: "ログイン"
|
||||||
|
|
|
@ -26,6 +26,7 @@ import { Packed } from '@/misc/json-schema.js';
|
||||||
import { sqlLikeEscape } from '@/misc/sql-like-escape.js';
|
import { sqlLikeEscape } from '@/misc/sql-like-escape.js';
|
||||||
import { CustomEmojiService } from '@/core/CustomEmojiService.js';
|
import { CustomEmojiService } from '@/core/CustomEmojiService.js';
|
||||||
import { emojiRegex } from '@/misc/emoji-regex.js';
|
import { emojiRegex } from '@/misc/emoji-regex.js';
|
||||||
|
import { NotificationService } from '@/core/NotificationService.js';
|
||||||
|
|
||||||
const MAX_ROOM_MEMBERS = 30;
|
const MAX_ROOM_MEMBERS = 30;
|
||||||
const MAX_REACTIONS_PER_MESSAGE = 100;
|
const MAX_REACTIONS_PER_MESSAGE = 100;
|
||||||
|
@ -68,6 +69,7 @@ export class ChatService {
|
||||||
private apRendererService: ApRendererService,
|
private apRendererService: ApRendererService,
|
||||||
private queueService: QueueService,
|
private queueService: QueueService,
|
||||||
private pushNotificationService: PushNotificationService,
|
private pushNotificationService: PushNotificationService,
|
||||||
|
private notificationService: NotificationService,
|
||||||
private userBlockingService: UserBlockingService,
|
private userBlockingService: UserBlockingService,
|
||||||
private queryService: QueryService,
|
private queryService: QueryService,
|
||||||
private roleService: RoleService,
|
private roleService: RoleService,
|
||||||
|
@ -544,6 +546,10 @@ export class ChatService {
|
||||||
|
|
||||||
const created = await this.chatRoomInvitationsRepository.insertOne(invitation);
|
const created = await this.chatRoomInvitationsRepository.insertOne(invitation);
|
||||||
|
|
||||||
|
this.notificationService.createNotification(inviteeId, 'chatRoomInvitationReceived', {
|
||||||
|
invitationId: invitation.id,
|
||||||
|
}, inviterId);
|
||||||
|
|
||||||
return created;
|
return created;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,7 @@ import { bindThis } from '@/decorators.js';
|
||||||
import { FilterUnionByProperty, groupedNotificationTypes } from '@/types.js';
|
import { FilterUnionByProperty, groupedNotificationTypes } from '@/types.js';
|
||||||
import { CacheService } from '@/core/CacheService.js';
|
import { CacheService } from '@/core/CacheService.js';
|
||||||
import { RoleEntityService } from './RoleEntityService.js';
|
import { RoleEntityService } from './RoleEntityService.js';
|
||||||
|
import { ChatEntityService } from './ChatEntityService.js';
|
||||||
import type { OnModuleInit } from '@nestjs/common';
|
import type { OnModuleInit } from '@nestjs/common';
|
||||||
import type { UserEntityService } from './UserEntityService.js';
|
import type { UserEntityService } from './UserEntityService.js';
|
||||||
import type { NoteEntityService } from './NoteEntityService.js';
|
import type { NoteEntityService } from './NoteEntityService.js';
|
||||||
|
@ -27,6 +28,7 @@ export class NotificationEntityService implements OnModuleInit {
|
||||||
private userEntityService: UserEntityService;
|
private userEntityService: UserEntityService;
|
||||||
private noteEntityService: NoteEntityService;
|
private noteEntityService: NoteEntityService;
|
||||||
private roleEntityService: RoleEntityService;
|
private roleEntityService: RoleEntityService;
|
||||||
|
private chatEntityService: ChatEntityService;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private moduleRef: ModuleRef,
|
private moduleRef: ModuleRef,
|
||||||
|
@ -41,9 +43,6 @@ export class NotificationEntityService implements OnModuleInit {
|
||||||
private followRequestsRepository: FollowRequestsRepository,
|
private followRequestsRepository: FollowRequestsRepository,
|
||||||
|
|
||||||
private cacheService: CacheService,
|
private cacheService: CacheService,
|
||||||
|
|
||||||
//private userEntityService: UserEntityService,
|
|
||||||
//private noteEntityService: NoteEntityService,
|
|
||||||
) {
|
) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -51,6 +50,7 @@ export class NotificationEntityService implements OnModuleInit {
|
||||||
this.userEntityService = this.moduleRef.get('UserEntityService');
|
this.userEntityService = this.moduleRef.get('UserEntityService');
|
||||||
this.noteEntityService = this.moduleRef.get('NoteEntityService');
|
this.noteEntityService = this.moduleRef.get('NoteEntityService');
|
||||||
this.roleEntityService = this.moduleRef.get('RoleEntityService');
|
this.roleEntityService = this.moduleRef.get('RoleEntityService');
|
||||||
|
this.chatEntityService = this.moduleRef.get('ChatEntityService');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -59,7 +59,6 @@ export class NotificationEntityService implements OnModuleInit {
|
||||||
async #packInternal <T extends MiNotification | MiGroupedNotification> (
|
async #packInternal <T extends MiNotification | MiGroupedNotification> (
|
||||||
src: T,
|
src: T,
|
||||||
meId: MiUser['id'],
|
meId: MiUser['id'],
|
||||||
|
|
||||||
options: {
|
options: {
|
||||||
checkValidNotifier?: boolean;
|
checkValidNotifier?: boolean;
|
||||||
},
|
},
|
||||||
|
@ -146,6 +145,13 @@ export class NotificationEntityService implements OnModuleInit {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const needsChatRoomInvitation = notification.type === 'chatRoomInvitationReceived';
|
||||||
|
const chatRoomInvitation = needsChatRoomInvitation ? await this.chatEntityService.packRoomInvitation(notification.invitationId, { id: meId }) : undefined;
|
||||||
|
// if the invitation has been deleted, don't show this notification
|
||||||
|
if (needsChatRoomInvitation && !chatRoomInvitation) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
return await awaitAll({
|
return await awaitAll({
|
||||||
id: notification.id,
|
id: notification.id,
|
||||||
createdAt: new Date(notification.createdAt).toISOString(),
|
createdAt: new Date(notification.createdAt).toISOString(),
|
||||||
|
@ -159,6 +165,9 @@ export class NotificationEntityService implements OnModuleInit {
|
||||||
...(notification.type === 'roleAssigned' ? {
|
...(notification.type === 'roleAssigned' ? {
|
||||||
role: role,
|
role: role,
|
||||||
} : {}),
|
} : {}),
|
||||||
|
...(notification.type === 'chatRoomInvitationReceived' ? {
|
||||||
|
invitation: chatRoomInvitation,
|
||||||
|
} : {}),
|
||||||
...(notification.type === 'followRequestAccepted' ? {
|
...(notification.type === 'followRequestAccepted' ? {
|
||||||
message: notification.message,
|
message: notification.message,
|
||||||
} : {}),
|
} : {}),
|
||||||
|
|
|
@ -75,6 +75,12 @@ export type MiNotification = {
|
||||||
id: string;
|
id: string;
|
||||||
createdAt: string;
|
createdAt: string;
|
||||||
roleId: MiRole['id'];
|
roleId: MiRole['id'];
|
||||||
|
} | {
|
||||||
|
type: 'chatRoomInvitationReceived';
|
||||||
|
id: string;
|
||||||
|
createdAt: string;
|
||||||
|
notifierId: MiUser['id'];
|
||||||
|
invitationId: string;
|
||||||
} | {
|
} | {
|
||||||
type: 'achievementEarned';
|
type: 'achievementEarned';
|
||||||
id: string;
|
id: string;
|
||||||
|
|
|
@ -287,6 +287,21 @@ export const packedNotificationSchema = {
|
||||||
optional: false, nullable: false,
|
optional: false, nullable: false,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
}, {
|
||||||
|
type: 'object',
|
||||||
|
properties: {
|
||||||
|
...baseSchema.properties,
|
||||||
|
type: {
|
||||||
|
type: 'string',
|
||||||
|
optional: false, nullable: false,
|
||||||
|
enum: ['chatRoomInvitationReceived'],
|
||||||
|
},
|
||||||
|
invitation: {
|
||||||
|
type: 'object',
|
||||||
|
ref: 'ChatRoomInvitation',
|
||||||
|
optional: false, nullable: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
}, {
|
}, {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
|
|
|
@ -608,6 +608,7 @@ export const packedMeDetailedOnlySchema = {
|
||||||
receiveFollowRequest: { optional: true, ...notificationRecieveConfig },
|
receiveFollowRequest: { optional: true, ...notificationRecieveConfig },
|
||||||
followRequestAccepted: { optional: true, ...notificationRecieveConfig },
|
followRequestAccepted: { optional: true, ...notificationRecieveConfig },
|
||||||
roleAssigned: { optional: true, ...notificationRecieveConfig },
|
roleAssigned: { optional: true, ...notificationRecieveConfig },
|
||||||
|
chatRoomInvitationReceived: { optional: true, ...notificationRecieveConfig },
|
||||||
achievementEarned: { optional: true, ...notificationRecieveConfig },
|
achievementEarned: { optional: true, ...notificationRecieveConfig },
|
||||||
app: { optional: true, ...notificationRecieveConfig },
|
app: { optional: true, ...notificationRecieveConfig },
|
||||||
test: { optional: true, ...notificationRecieveConfig },
|
test: { optional: true, ...notificationRecieveConfig },
|
||||||
|
|
|
@ -106,6 +106,7 @@ export const meta = {
|
||||||
receiveFollowRequest: { optional: true, ...notificationRecieveConfig },
|
receiveFollowRequest: { optional: true, ...notificationRecieveConfig },
|
||||||
followRequestAccepted: { optional: true, ...notificationRecieveConfig },
|
followRequestAccepted: { optional: true, ...notificationRecieveConfig },
|
||||||
roleAssigned: { optional: true, ...notificationRecieveConfig },
|
roleAssigned: { optional: true, ...notificationRecieveConfig },
|
||||||
|
chatRoomInvitationReceived: { optional: true, ...notificationRecieveConfig },
|
||||||
achievementEarned: { optional: true, ...notificationRecieveConfig },
|
achievementEarned: { optional: true, ...notificationRecieveConfig },
|
||||||
app: { optional: true, ...notificationRecieveConfig },
|
app: { optional: true, ...notificationRecieveConfig },
|
||||||
test: { optional: true, ...notificationRecieveConfig },
|
test: { optional: true, ...notificationRecieveConfig },
|
||||||
|
|
|
@ -212,6 +212,7 @@ export const paramDef = {
|
||||||
receiveFollowRequest: notificationRecieveConfig,
|
receiveFollowRequest: notificationRecieveConfig,
|
||||||
followRequestAccepted: notificationRecieveConfig,
|
followRequestAccepted: notificationRecieveConfig,
|
||||||
roleAssigned: notificationRecieveConfig,
|
roleAssigned: notificationRecieveConfig,
|
||||||
|
chatRoomInvitationReceived: notificationRecieveConfig,
|
||||||
achievementEarned: notificationRecieveConfig,
|
achievementEarned: notificationRecieveConfig,
|
||||||
app: notificationRecieveConfig,
|
app: notificationRecieveConfig,
|
||||||
test: notificationRecieveConfig,
|
test: notificationRecieveConfig,
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
* receiveFollowRequest - フォローリクエストされた
|
* receiveFollowRequest - フォローリクエストされた
|
||||||
* followRequestAccepted - 自分の送ったフォローリクエストが承認された
|
* followRequestAccepted - 自分の送ったフォローリクエストが承認された
|
||||||
* roleAssigned - ロールが付与された
|
* roleAssigned - ロールが付与された
|
||||||
|
* chatRoomInvitationReceived - チャットルームに招待された
|
||||||
* achievementEarned - 実績を獲得
|
* achievementEarned - 実績を獲得
|
||||||
* exportCompleted - エクスポートが完了
|
* exportCompleted - エクスポートが完了
|
||||||
* login - ログイン
|
* login - ログイン
|
||||||
|
@ -34,6 +35,7 @@ export const notificationTypes = [
|
||||||
'receiveFollowRequest',
|
'receiveFollowRequest',
|
||||||
'followRequestAccepted',
|
'followRequestAccepted',
|
||||||
'roleAssigned',
|
'roleAssigned',
|
||||||
|
'chatRoomInvitationReceived',
|
||||||
'achievementEarned',
|
'achievementEarned',
|
||||||
'exportCompleted',
|
'exportCompleted',
|
||||||
'login',
|
'login',
|
||||||
|
|
|
@ -66,6 +66,7 @@ export const notificationTypes = [
|
||||||
'receiveFollowRequest',
|
'receiveFollowRequest',
|
||||||
'followRequestAccepted',
|
'followRequestAccepted',
|
||||||
'roleAssigned',
|
'roleAssigned',
|
||||||
|
'chatRoomInvitationReceived',
|
||||||
'achievementEarned',
|
'achievementEarned',
|
||||||
'exportCompleted',
|
'exportCompleted',
|
||||||
'login',
|
'login',
|
||||||
|
|
|
@ -43,6 +43,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<i v-else-if="notification.type === 'exportCompleted'" class="ti ti-archive"></i>
|
<i v-else-if="notification.type === 'exportCompleted'" class="ti ti-archive"></i>
|
||||||
<i v-else-if="notification.type === 'login'" class="ti ti-login-2"></i>
|
<i v-else-if="notification.type === 'login'" class="ti ti-login-2"></i>
|
||||||
<i v-else-if="notification.type === 'createToken'" class="ti ti-key"></i>
|
<i v-else-if="notification.type === 'createToken'" class="ti ti-key"></i>
|
||||||
|
<i v-else-if="notification.type === 'chatRoomInvitationReceived'" class="ti ti-messages"></i>
|
||||||
<template v-else-if="notification.type === 'roleAssigned'">
|
<template v-else-if="notification.type === 'roleAssigned'">
|
||||||
<img v-if="notification.role.iconUrl" style="height: 1.3em; vertical-align: -22%;" :src="notification.role.iconUrl" alt=""/>
|
<img v-if="notification.role.iconUrl" style="height: 1.3em; vertical-align: -22%;" :src="notification.role.iconUrl" alt=""/>
|
||||||
<i v-else class="ti ti-badges"></i>
|
<i v-else class="ti ti-badges"></i>
|
||||||
|
@ -61,6 +62,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<span v-if="notification.type === 'pollEnded'">{{ i18n.ts._notification.pollEnded }}</span>
|
<span v-if="notification.type === 'pollEnded'">{{ i18n.ts._notification.pollEnded }}</span>
|
||||||
<span v-else-if="notification.type === 'note'">{{ i18n.ts._notification.newNote }}: <MkUserName :user="notification.note.user"/></span>
|
<span v-else-if="notification.type === 'note'">{{ i18n.ts._notification.newNote }}: <MkUserName :user="notification.note.user"/></span>
|
||||||
<span v-else-if="notification.type === 'roleAssigned'">{{ i18n.ts._notification.roleAssigned }}</span>
|
<span v-else-if="notification.type === 'roleAssigned'">{{ i18n.ts._notification.roleAssigned }}</span>
|
||||||
|
<span v-else-if="notification.type === 'chatRoomInvitationReceived'">{{ i18n.ts._notification.chatRoomInvitationReceived }}</span>
|
||||||
<span v-else-if="notification.type === 'achievementEarned'">{{ i18n.ts._notification.achievementEarned }}</span>
|
<span v-else-if="notification.type === 'achievementEarned'">{{ i18n.ts._notification.achievementEarned }}</span>
|
||||||
<span v-else-if="notification.type === 'login'">{{ i18n.ts._notification.login }}</span>
|
<span v-else-if="notification.type === 'login'">{{ i18n.ts._notification.login }}</span>
|
||||||
<span v-else-if="notification.type === 'createToken'">{{ i18n.ts._notification.createToken }}</span>
|
<span v-else-if="notification.type === 'createToken'">{{ i18n.ts._notification.createToken }}</span>
|
||||||
|
@ -104,6 +106,9 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<div v-else-if="notification.type === 'roleAssigned'" :class="$style.text">
|
<div v-else-if="notification.type === 'roleAssigned'" :class="$style.text">
|
||||||
{{ notification.role.name }}
|
{{ notification.role.name }}
|
||||||
</div>
|
</div>
|
||||||
|
<div v-else-if="notification.type === 'chatRoomInvitationReceived'" :class="$style.text">
|
||||||
|
{{ notification.invitation.room.name }}
|
||||||
|
</div>
|
||||||
<MkA v-else-if="notification.type === 'achievementEarned'" :class="$style.text" to="/my/achievements">
|
<MkA v-else-if="notification.type === 'achievementEarned'" :class="$style.text" to="/my/achievements">
|
||||||
{{ i18n.ts._achievements._types['_' + notification.achievement].title }}
|
{{ i18n.ts._achievements._types['_' + notification.achievement].title }}
|
||||||
</MkA>
|
</MkA>
|
||||||
|
|
|
@ -3040,7 +3040,7 @@ type Notification_2 = components['schemas']['Notification'];
|
||||||
type NotificationsCreateRequest = operations['notifications___create']['requestBody']['content']['application/json'];
|
type NotificationsCreateRequest = operations['notifications___create']['requestBody']['content']['application/json'];
|
||||||
|
|
||||||
// @public (undocumented)
|
// @public (undocumented)
|
||||||
export const notificationTypes: readonly ["note", "follow", "mention", "reply", "renote", "quote", "reaction", "pollVote", "pollEnded", "receiveFollowRequest", "followRequestAccepted", "groupInvited", "app", "roleAssigned", "achievementEarned"];
|
export const notificationTypes: readonly ["note", "follow", "mention", "reply", "renote", "quote", "reaction", "pollVote", "pollEnded", "receiveFollowRequest", "followRequestAccepted", "groupInvited", "app", "roleAssigned", "chatRoomInvitationReceived", "achievementEarned"];
|
||||||
|
|
||||||
// @public (undocumented)
|
// @public (undocumented)
|
||||||
export function nyaize(text: string): string;
|
export function nyaize(text: string): string;
|
||||||
|
|
|
@ -4201,6 +4201,15 @@ export type components = {
|
||||||
/** Format: misskey:id */
|
/** Format: misskey:id */
|
||||||
userListId: string;
|
userListId: string;
|
||||||
}]>;
|
}]>;
|
||||||
|
chatRoomInvitationReceived?: OneOf<[{
|
||||||
|
/** @enum {string} */
|
||||||
|
type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'followingOrFollower' | 'never';
|
||||||
|
}, {
|
||||||
|
/** @enum {string} */
|
||||||
|
type: 'list';
|
||||||
|
/** Format: misskey:id */
|
||||||
|
userListId: string;
|
||||||
|
}]>;
|
||||||
achievementEarned?: OneOf<[{
|
achievementEarned?: OneOf<[{
|
||||||
/** @enum {string} */
|
/** @enum {string} */
|
||||||
type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'followingOrFollower' | 'never';
|
type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'followingOrFollower' | 'never';
|
||||||
|
@ -4538,6 +4547,14 @@ export type components = {
|
||||||
/** @enum {string} */
|
/** @enum {string} */
|
||||||
type: 'roleAssigned';
|
type: 'roleAssigned';
|
||||||
role: components['schemas']['Role'];
|
role: components['schemas']['Role'];
|
||||||
|
} | {
|
||||||
|
/** Format: id */
|
||||||
|
id: string;
|
||||||
|
/** Format: date-time */
|
||||||
|
createdAt: string;
|
||||||
|
/** @enum {string} */
|
||||||
|
type: 'chatRoomInvitationReceived';
|
||||||
|
invitation: components['schemas']['ChatRoomInvitation'];
|
||||||
} | ({
|
} | ({
|
||||||
/** Format: id */
|
/** Format: id */
|
||||||
id: string;
|
id: string;
|
||||||
|
@ -10084,6 +10101,15 @@ export type operations = {
|
||||||
/** Format: misskey:id */
|
/** Format: misskey:id */
|
||||||
userListId: string;
|
userListId: string;
|
||||||
}]>;
|
}]>;
|
||||||
|
chatRoomInvitationReceived?: OneOf<[{
|
||||||
|
/** @enum {string} */
|
||||||
|
type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'followingOrFollower' | 'never';
|
||||||
|
}, {
|
||||||
|
/** @enum {string} */
|
||||||
|
type: 'list';
|
||||||
|
/** Format: misskey:id */
|
||||||
|
userListId: string;
|
||||||
|
}]>;
|
||||||
achievementEarned?: OneOf<[{
|
achievementEarned?: OneOf<[{
|
||||||
/** @enum {string} */
|
/** @enum {string} */
|
||||||
type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'followingOrFollower' | 'never';
|
type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'followingOrFollower' | 'never';
|
||||||
|
@ -21573,8 +21599,8 @@ export type operations = {
|
||||||
untilId?: string;
|
untilId?: string;
|
||||||
/** @default true */
|
/** @default true */
|
||||||
markAsRead?: boolean;
|
markAsRead?: boolean;
|
||||||
includeTypes?: ('note' | 'follow' | 'mention' | 'reply' | 'renote' | 'quote' | 'reaction' | 'pollEnded' | 'receiveFollowRequest' | 'followRequestAccepted' | 'roleAssigned' | 'achievementEarned' | 'exportCompleted' | 'login' | 'createToken' | 'app' | 'test' | 'pollVote' | 'groupInvited')[];
|
includeTypes?: ('note' | 'follow' | 'mention' | 'reply' | 'renote' | 'quote' | 'reaction' | 'pollEnded' | 'receiveFollowRequest' | 'followRequestAccepted' | 'roleAssigned' | 'chatRoomInvitationReceived' | 'achievementEarned' | 'exportCompleted' | 'login' | 'createToken' | 'app' | 'test' | 'pollVote' | 'groupInvited')[];
|
||||||
excludeTypes?: ('note' | 'follow' | 'mention' | 'reply' | 'renote' | 'quote' | 'reaction' | 'pollEnded' | 'receiveFollowRequest' | 'followRequestAccepted' | 'roleAssigned' | 'achievementEarned' | 'exportCompleted' | 'login' | 'createToken' | 'app' | 'test' | 'pollVote' | 'groupInvited')[];
|
excludeTypes?: ('note' | 'follow' | 'mention' | 'reply' | 'renote' | 'quote' | 'reaction' | 'pollEnded' | 'receiveFollowRequest' | 'followRequestAccepted' | 'roleAssigned' | 'chatRoomInvitationReceived' | 'achievementEarned' | 'exportCompleted' | 'login' | 'createToken' | 'app' | 'test' | 'pollVote' | 'groupInvited')[];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -21641,8 +21667,8 @@ export type operations = {
|
||||||
untilId?: string;
|
untilId?: string;
|
||||||
/** @default true */
|
/** @default true */
|
||||||
markAsRead?: boolean;
|
markAsRead?: boolean;
|
||||||
includeTypes?: ('note' | 'follow' | 'mention' | 'reply' | 'renote' | 'quote' | 'reaction' | 'pollEnded' | 'receiveFollowRequest' | 'followRequestAccepted' | 'roleAssigned' | 'achievementEarned' | 'exportCompleted' | 'login' | 'createToken' | 'app' | 'test' | 'reaction:grouped' | 'renote:grouped' | 'pollVote' | 'groupInvited')[];
|
includeTypes?: ('note' | 'follow' | 'mention' | 'reply' | 'renote' | 'quote' | 'reaction' | 'pollEnded' | 'receiveFollowRequest' | 'followRequestAccepted' | 'roleAssigned' | 'chatRoomInvitationReceived' | 'achievementEarned' | 'exportCompleted' | 'login' | 'createToken' | 'app' | 'test' | 'reaction:grouped' | 'renote:grouped' | 'pollVote' | 'groupInvited')[];
|
||||||
excludeTypes?: ('note' | 'follow' | 'mention' | 'reply' | 'renote' | 'quote' | 'reaction' | 'pollEnded' | 'receiveFollowRequest' | 'followRequestAccepted' | 'roleAssigned' | 'achievementEarned' | 'exportCompleted' | 'login' | 'createToken' | 'app' | 'test' | 'reaction:grouped' | 'renote:grouped' | 'pollVote' | 'groupInvited')[];
|
excludeTypes?: ('note' | 'follow' | 'mention' | 'reply' | 'renote' | 'quote' | 'reaction' | 'pollEnded' | 'receiveFollowRequest' | 'followRequestAccepted' | 'roleAssigned' | 'chatRoomInvitationReceived' | 'achievementEarned' | 'exportCompleted' | 'login' | 'createToken' | 'app' | 'test' | 'reaction:grouped' | 'renote:grouped' | 'pollVote' | 'groupInvited')[];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -22738,6 +22764,15 @@ export type operations = {
|
||||||
/** Format: misskey:id */
|
/** Format: misskey:id */
|
||||||
userListId: string;
|
userListId: string;
|
||||||
}]>;
|
}]>;
|
||||||
|
chatRoomInvitationReceived?: OneOf<[{
|
||||||
|
/** @enum {string} */
|
||||||
|
type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'followingOrFollower' | 'never';
|
||||||
|
}, {
|
||||||
|
/** @enum {string} */
|
||||||
|
type: 'list';
|
||||||
|
/** Format: misskey:id */
|
||||||
|
userListId: string;
|
||||||
|
}]>;
|
||||||
achievementEarned?: OneOf<[{
|
achievementEarned?: OneOf<[{
|
||||||
/** @enum {string} */
|
/** @enum {string} */
|
||||||
type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'followingOrFollower' | 'never';
|
type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'followingOrFollower' | 'never';
|
||||||
|
|
|
@ -16,7 +16,7 @@ import type {
|
||||||
UserLite,
|
UserLite,
|
||||||
} from './autogen/models.js';
|
} from './autogen/models.js';
|
||||||
|
|
||||||
export const notificationTypes = ['note', 'follow', 'mention', 'reply', 'renote', 'quote', 'reaction', 'pollVote', 'pollEnded', 'receiveFollowRequest', 'followRequestAccepted', 'groupInvited', 'app', 'roleAssigned', 'achievementEarned'] as const;
|
export const notificationTypes = ['note', 'follow', 'mention', 'reply', 'renote', 'quote', 'reaction', 'pollVote', 'pollEnded', 'receiveFollowRequest', 'followRequestAccepted', 'groupInvited', 'app', 'roleAssigned', 'chatRoomInvitationReceived', 'achievementEarned'] as const;
|
||||||
|
|
||||||
export const noteVisibilities = ['public', 'home', 'followers', 'specified'] as const;
|
export const noteVisibilities = ['public', 'home', 'followers', 'specified'] as const;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue