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: Add support for events #10628

Open
wants to merge 62 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
c7e607e
Add event source code to models
ssmucny Apr 13, 2023
10e134a
entity typo
ssmucny Apr 13, 2023
4e6a491
Event migration
ssmucny Apr 14, 2023
8ab1d62
Changed DB to have events behave like polls
ssmucny Apr 16, 2023
a56561f
add new migration
ssmucny Apr 16, 2023
173a901
denormalize Events/Notes relation
ssmucny Apr 16, 2023
453d25f
Add Event to create api
ssmucny Apr 16, 2023
44d05d5
Add event to repositories (getters)
ssmucny Apr 16, 2023
1a797ee
Added notes/events/search endpoint logic
ssmucny Apr 17, 2023
9ac5053
Add simple display of event to note in UI
ssmucny Apr 18, 2023
753cef9
Add events tab to user details page
ssmucny Apr 21, 2023
07b3f19
Change displayed date/time format for events
ssmucny Apr 21, 2023
8def7af
Add form to create events in UI
ssmucny Apr 21, 2023
b515673
Add ability to GET event data from federated AP
ssmucny Apr 21, 2023
4df0407
Add event to AP publishing
ssmucny Apr 21, 2023
a967c02
Add basic event search page
ssmucny Apr 23, 2023
4ecdff8
Add query string to event search
ssmucny Apr 23, 2023
a57c790
Add date range to event search page
ssmucny Apr 23, 2023
b3fb7c9
Update API types
ssmucny Apr 23, 2023
661c83a
bug fixes and localization:
ssmucny Apr 24, 2023
1079eef
update CHANGELOG
ssmucny Apr 24, 2023
a4c7264
Merge branch 'develop' into ssmucny-events
ssmucny Apr 24, 2023
bcbc261
Bug fix in extractEventFromNote with minimum Note
ssmucny Apr 25, 2023
5295dda
Update misskey-js API md file
ssmucny Apr 25, 2023
73022c7
lint fix
ssmucny Apr 25, 2023
b5022ac
Change event search to use similar to clause
ssmucny Apr 30, 2023
5f6d708
update API docs
ssmucny Apr 30, 2023
a12152c
Change event search
ssmucny Apr 30, 2023
e97e620
Merge branch 'develop' into ssmucny-events
ssmucny Apr 30, 2023
c4b3152
chore: tweak MkEvent
acid-chicken May 18, 2023
47f43e8
Change events to use schema.org/Event for metadata
ssmucny May 19, 2023
5abbcf6
Merge branch 'ssmucny-events' of https://github.com/ssmucny/misskey i…
ssmucny May 19, 2023
b7c7e4d
Add Event schema to metadata
ssmucny May 23, 2023
edd18f1
update APEventService with new metadata schema
ssmucny May 24, 2023
df6fde8
Updating event editor to handle new fields
ssmucny May 24, 2023
95e9cd8
Merge branch 'develop' into ssmucny-events
ssmucny Jun 5, 2023
77018c5
update event editor fields
ssmucny Jun 5, 2023
1f5b368
Merge branch 'ssmucny-events' of https://github.com/ssmucny/misskey i…
ssmucny Jun 5, 2023
fbe451f
Fixes to event editor
ssmucny Jun 5, 2023
825a4be
- add i18n
ssmucny Jun 6, 2023
04aad40
- add links to event display
ssmucny Jun 17, 2023
30f43e7
Merge branch 'develop' into ssmucny-events
ssmucny Jun 17, 2023
603ed1a
fix event search
ssmucny Jun 17, 2023
e40ffc1
UI fixes
ssmucny Jun 17, 2023
8293c1b
- refactor search page
ssmucny Jun 17, 2023
5b9c733
update api types
ssmucny Jun 17, 2023
20f1a39
lint fixes
ssmucny Jun 17, 2023
a5dcc82
update event types for federation
ssmucny Jun 18, 2023
76b55e7
Clean up styles
ssmucny Jun 24, 2023
fcf72dc
Merge branch 'develop' into ssmucny-events
ssmucny Jun 25, 2023
f2db387
Merge branch 'develop' into ssmucny-events
ssmucny Jul 9, 2023
cf6479b
Merge branch 'develop' into ssmucny-events
tamaina Jul 10, 2023
b862aa9
Merge branch 'develop' into ssmucny-events
ssmucny Jul 11, 2023
ea36e35
Merge branch 'develop' into ssmucny-events
syuilo Jul 28, 2023
9beca6f
Merge branch 'develop' into ssmucny-events
ssmucny Jul 28, 2023
e29736b
Merge branch 'develop' into pr/10628
syuilo Aug 20, 2023
119bb55
Update Event.ts
syuilo Aug 20, 2023
3f3d389
Merge branch 'develop' into ssmucny-events
ssmucny Aug 21, 2023
8eda686
Merge branch 'develop' into pr/10628
syuilo Aug 27, 2023
124f658
Merge branch 'ssmucny-events' of https://github.com/ssmucny/misskey i…
syuilo Aug 27, 2023
23f77fc
tweak
syuilo Aug 27, 2023
8ec1182
Update index.d.ts
syuilo Aug 27, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ Meilisearchの設定に`index`が必要になりました。値はMisskeyサー
- Node.js 18.16.0以上が必要になりました

### General
- Add support for user created events. Includes basic federation of ActivityPub Event objects. [PR 10628](https://github.com/misskey-dev/misskey/pull/10628) @ssmucny
- アカウントの引っ越し(フォロワー引き継ぎ)に対応
- Meilisearchを全文検索に使用できるようになりました
* 「フォロワーのみ」の投稿は検索結果に表示されません。
Expand Down
30 changes: 30 additions & 0 deletions locales/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1033,6 +1033,9 @@ export interface Locale {
"accountMovedShort": string;
"operationForbidden": string;
"forceShowAds": string;
"event": string;
"events": string;
"reverseChronological": string;
"addMemo": string;
"editMemo": string;
"reactionsList": string;
Expand Down Expand Up @@ -1134,6 +1137,33 @@ export interface Locale {
"_serverRules": {
"description": string;
};
"_event": {
"startDateTime": string;
"endDateTime": string;
"startDate": string;
"endDate": string;
"startTime": string;
"endTime": string;
"detailName": string;
"detailValue": string;
"location": string;
"doorTime": string;
"organizer": string;
"organizerLink": string;
"audience": string;
"language": string;
"ageRange": string;
"ticketsUrl": string;
"isFree": string;
"price": string;
"availability": string;
"from": string;
"until": string;
"availabilityStart": string;
"availabilityEnd": string;
"keywords": string;
"performers": string;
};
"_accountMigration": {
"moveFrom": string;
"moveFromSub": string;
Expand Down
30 changes: 30 additions & 0 deletions locales/ja-JP.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1030,6 +1030,9 @@ accountMoved: "このユーザーは新しいアカウントに移行しまし
accountMovedShort: "このアカウントは移行されています"
operationForbidden: "この操作はできません"
forceShowAds: "常に広告を表示する"
event: "イベント"
events: "イベント"
reverseChronological: "倒叙"
addMemo: "メモを追加"
editMemo: "メモを編集"
reactionsList: "リアクション一覧"
Expand Down Expand Up @@ -1132,6 +1135,33 @@ _initialAccountSetting:
_serverRules:
description: "新規登録前に表示する、サーバーの簡潔なルールを設定します。内容は利用規約の要約とすることを推奨します。"

_event:
startDateTime: "開始日時"
endDateTime: "終了日時"
startDate: "開始日"
endDate: "終了日"
startTime: "開始時刻"
endTime: "終了時刻"
detailName: "属性"
detailValue: "値"
location: "Location"
doorTime: "Door Time"
organizer: "Organizer"
organizerLink: "Organizer Link"
audience: "Audience"
language: "Language"
ageRange: "Age Range"
ticketsUrl: "Tickets"
isFree: "Free"
price: "Price"
availability: "Availability"
from: "From"
until: "Until"
availabilityStart: "Availability Start"
availabilityEnd: "Availability End"
keywords: "Keywords"
performers: "Performers"

_accountMigration:
moveFrom: "別のアカウントからこのアカウントに移行"
moveFromSub: "別のアカウントへエイリアスを作成"
Expand Down
95 changes: 95 additions & 0 deletions packages/backend/migration/1681429921400-Event.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 29 additions & 0 deletions packages/backend/migration/1681673280586-event.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
export class Event1681673280586 {
name = 'Event1681673280586'

async up(queryRunner) {
await queryRunner.query(`ALTER TABLE "note" DROP CONSTRAINT "FK_3af9380f266b7046cce9c992197"`);
await queryRunner.query(`DROP INDEX "public"."IDX_3af9380f266b7046cce9c99219"`);
await queryRunner.query(`ALTER TABLE "note" RENAME COLUMN "eventId" TO "isEvent"`);
await queryRunner.query(`ALTER TABLE "note" RENAME CONSTRAINT "UQ_3af9380f266b7046cce9c992197" TO "UQ_16484b50d1ee91555d4b8821ac3"`);
await queryRunner.query(`ALTER TABLE "event" RENAME COLUMN "id" TO "noteId"`);
await queryRunner.query(`ALTER TABLE "event" RENAME CONSTRAINT "PK_30c2f3bbaf6d34a55f8ae6e4614" TO "PK_2b481f231cd035e84390072bf7b"`);
await queryRunner.query(`ALTER TABLE "note" DROP CONSTRAINT "UQ_16484b50d1ee91555d4b8821ac3"`);
await queryRunner.query(`ALTER TABLE "note" DROP COLUMN "isEvent"`);
await queryRunner.query(`ALTER TABLE "note" ADD "isEvent" boolean NOT NULL DEFAULT false`);
await queryRunner.query(`ALTER TABLE "event" ADD CONSTRAINT "FK_2b481f231cd035e84390072bf7b" FOREIGN KEY ("noteId") REFERENCES "note"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
}

async down(queryRunner) {
await queryRunner.query(`ALTER TABLE "event" DROP CONSTRAINT "FK_2b481f231cd035e84390072bf7b"`);
await queryRunner.query(`ALTER TABLE "note" DROP COLUMN "isEvent"`);
await queryRunner.query(`ALTER TABLE "note" ADD "isEvent" character varying(32)`);
await queryRunner.query(`ALTER TABLE "note" ADD CONSTRAINT "UQ_16484b50d1ee91555d4b8821ac3" UNIQUE ("isEvent")`);
await queryRunner.query(`ALTER TABLE "event" RENAME CONSTRAINT "PK_2b481f231cd035e84390072bf7b" TO "PK_30c2f3bbaf6d34a55f8ae6e4614"`);
await queryRunner.query(`ALTER TABLE "event" RENAME COLUMN "noteId" TO "id"`);
await queryRunner.query(`ALTER TABLE "note" RENAME CONSTRAINT "UQ_16484b50d1ee91555d4b8821ac3" TO "UQ_3af9380f266b7046cce9c992197"`);
await queryRunner.query(`ALTER TABLE "note" RENAME COLUMN "isEvent" TO "eventId"`);
await queryRunner.query(`CREATE INDEX "IDX_3af9380f266b7046cce9c99219" ON "note" ("eventId") `);
await queryRunner.query(`ALTER TABLE "note" ADD CONSTRAINT "FK_3af9380f266b7046cce9c992197" FOREIGN KEY ("eventId") REFERENCES "event"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
}
}
29 changes: 29 additions & 0 deletions packages/backend/migration/1681675881633-event.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
export class Event1681675881633 {
name = 'Event1681675881633'

async up(queryRunner) {
await queryRunner.query(`ALTER TABLE "note" RENAME COLUMN "isEvent" TO "hasEvent"`);
await queryRunner.query(`CREATE TYPE "public"."event_notevisibility_enum" AS ENUM('public', 'home', 'followers', 'specified')`);
await queryRunner.query(`ALTER TABLE "event" ADD "noteVisibility" "public"."event_notevisibility_enum" NOT NULL`);
await queryRunner.query(`COMMENT ON COLUMN "event"."noteVisibility" IS '[Denormalized]'`);
await queryRunner.query(`ALTER TABLE "event" ADD "userId" character varying(32) NOT NULL`);
await queryRunner.query(`COMMENT ON COLUMN "event"."userId" IS '[Denormalized]'`);
await queryRunner.query(`ALTER TABLE "event" ADD "userHost" character varying(128)`);
await queryRunner.query(`COMMENT ON COLUMN "event"."userHost" IS '[Denormalized]'`);
await queryRunner.query(`CREATE INDEX "IDX_01cd2b829e0263917bf570cb67" ON "event" ("userId") `);
await queryRunner.query(`CREATE INDEX "IDX_f6ba57dff679ccbcfe004698ec" ON "event" ("userHost") `);
}

async down(queryRunner) {
await queryRunner.query(`DROP INDEX "public"."IDX_f6ba57dff679ccbcfe004698ec"`);
await queryRunner.query(`DROP INDEX "public"."IDX_01cd2b829e0263917bf570cb67"`);
await queryRunner.query(`COMMENT ON COLUMN "event"."userHost" IS '[Denormalized]'`);
await queryRunner.query(`ALTER TABLE "event" DROP COLUMN "userHost"`);
await queryRunner.query(`COMMENT ON COLUMN "event"."userId" IS '[Denormalized]'`);
await queryRunner.query(`ALTER TABLE "event" DROP COLUMN "userId"`);
await queryRunner.query(`COMMENT ON COLUMN "event"."noteVisibility" IS '[Denormalized]'`);
await queryRunner.query(`ALTER TABLE "event" DROP COLUMN "noteVisibility"`);
await queryRunner.query(`DROP TYPE "public"."event_notevisibility_enum"`);
await queryRunner.query(`ALTER TABLE "note" RENAME COLUMN "hasEvent" TO "isEvent"`);
}
}
Loading