feat: フォローされた際のメッセージを設定できるようにする (#14430)
* feat: フォローされた際のメッセージを設定できるようにする Resolve #14425 * Update CHANGELOG.md * 既にフォローしているユーザーのメッセージも見れるように * Update packages/frontend/src/components/MkNotification.vue Co-authored-by: かっこかり <67428053+kakkokari-gtyih@users.noreply.github.com> * fix indent * Update users.ts * wip * Update users.ts --------- Co-authored-by: かっこかり <67428053+kakkokari-gtyih@users.noreply.github.com>
This commit is contained in:
@@ -69,6 +69,7 @@ export type MiNotification = {
|
||||
id: string;
|
||||
createdAt: string;
|
||||
notifierId: MiUser['id'];
|
||||
message: string | null;
|
||||
} | {
|
||||
type: 'roleAssigned';
|
||||
id: string;
|
||||
|
||||
@@ -289,5 +289,6 @@ export const localUsernameSchema = { type: 'string', pattern: /^\w{1,20}$/.toStr
|
||||
export const passwordSchema = { type: 'string', minLength: 1 } as const;
|
||||
export const nameSchema = { type: 'string', minLength: 1, maxLength: 50 } as const;
|
||||
export const descriptionSchema = { type: 'string', minLength: 1, maxLength: 1500 } as const;
|
||||
export const followedMessageSchema = { type: 'string', minLength: 1, maxLength: 256 } as const;
|
||||
export const locationSchema = { type: 'string', minLength: 1, maxLength: 50 } as const;
|
||||
export const birthdaySchema = { type: 'string', pattern: /^([0-9]{4})-([0-9]{2})-([0-9]{2})$/.toString().slice(1, -1) } as const;
|
||||
|
||||
@@ -42,6 +42,14 @@ export class MiUserProfile {
|
||||
})
|
||||
public description: string | null;
|
||||
|
||||
// フォローされた際のメッセージ
|
||||
@Column('varchar', {
|
||||
length: 256, nullable: true,
|
||||
})
|
||||
public followedMessage: string | null;
|
||||
|
||||
// TODO: 鍵アカウントの場合の、フォローリクエスト受信時のメッセージも設定できるようにする
|
||||
|
||||
@Column('jsonb', {
|
||||
default: [],
|
||||
})
|
||||
|
||||
@@ -267,6 +267,10 @@ export const packedNotificationSchema = {
|
||||
optional: false, nullable: false,
|
||||
format: 'id',
|
||||
},
|
||||
message: {
|
||||
type: 'string',
|
||||
optional: false, nullable: true,
|
||||
},
|
||||
},
|
||||
}, {
|
||||
type: 'object',
|
||||
|
||||
@@ -370,6 +370,10 @@ export const packedUserDetailedNotMeOnlySchema = {
|
||||
ref: 'RoleLite',
|
||||
},
|
||||
},
|
||||
followedMessage: {
|
||||
type: 'string',
|
||||
nullable: true, optional: true,
|
||||
},
|
||||
memo: {
|
||||
type: 'string',
|
||||
nullable: true, optional: false,
|
||||
@@ -437,6 +441,10 @@ export const packedMeDetailedOnlySchema = {
|
||||
nullable: true, optional: false,
|
||||
format: 'id',
|
||||
},
|
||||
followedMessage: {
|
||||
type: 'string',
|
||||
nullable: true, optional: false,
|
||||
},
|
||||
isModerator: {
|
||||
type: 'boolean',
|
||||
nullable: true, optional: false,
|
||||
|
||||
Reference in New Issue
Block a user