Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: 個人宛てお知らせ機能 #100

Merged

Conversation

CyberRex0
Copy link

What

お知らせ機能を拡張し、個人宛てにお知らせを送信できるようにする。

Additional info (optional)

ローカルにてテスト済み

Copy link
Collaborator

@riku6460 riku6460 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

とりあえず

packages/backend/src/server/api/endpoints/announcements.ts Outdated Show resolved Hide resolved
packages/frontend/src/pages/announcements.vue Outdated Show resolved Hide resolved
packages/frontend/src/pages/admin/announcements.vue Outdated Show resolved Hide resolved
packages/frontend/src/pages/admin/announcements.vue Outdated Show resolved Hide resolved
Comment on lines +220 to +229
const count1 = await this.announcementsRepository.countBy(reads.length > 0 ? {
id: Not(In(reads.map(read => read.announcementId))),
} : {});
userId: IsNull(),
} : { userId: IsNull() });
const count2 = await this.announcementsRepository.countBy(reads.length > 0 ? {
id: Not(In(reads.map(read => read.announcementId))),
userId: userId,
} : { userId: userId });

const count = count1 + count2;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1クエリでできそう

packages/backend/src/server/api/endpoints/announcements.ts Outdated Show resolved Hide resolved
packages/backend/src/server/api/endpoints/announcements.ts Outdated Show resolved Hide resolved
packages/misskey-js/src/entities.ts Outdated Show resolved Hide resolved
packages/frontend/src/pages/announcements.vue Outdated Show resolved Hide resolved
packages/frontend/src/pages/announcements.vue Outdated Show resolved Hide resolved
@riku6460 riku6460 changed the base branch from io to user-announcement July 7, 2023 17:33
@riku6460 riku6460 merged this pull request into MisskeyIO:user-announcement Jul 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants