forked from kokonect-link/cherrypick
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support fedibird searchableBy (#169)
* wip: activitypub contextを追加 * wip: activitypubのtypeでsearchableByを拡張 * wip: ApRendererに追加 * wip: DBモデル定義 * wip: add to ApNoteService * wip * wip: migration * wip * wip: api * wip: update * wip * wip * fix?: searchableByはundefinedではないものとする * fix? * testどうにかする * NOT NULL制約消す * わからん * マイグレがCJSだった * 検索でsearchableByを考慮 * いけるかも? * insertの修正 * inboxいじった * わからん * apnote * unitテスト通るはず * reactedに対応するはず? * fix: 検索が壊れてた * 日本語ロケールを変更 * update changelog * ApInboxに不要なimportが追加されていたのを修正 --------- Co-authored-by: Esurio <[email protected]>
- Loading branch information
Showing
23 changed files
with
212 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
packages/backend/migration/1725875666723-AddSearchableBy.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
export class AddSearchableBy1725875666723 { | ||
name = 'AddSearchableBy1725875666723' | ||
|
||
async up(queryRunner) { | ||
await queryRunner.query(`CREATE TYPE "note_searchableBy_enum" AS ENUM('public', 'followers', 'reacted', 'limited')`); | ||
await queryRunner.query(`ALTER TABLE "note" ADD "searchableBy" "note_searchableBy_enum" NOT NULL DEFAULT 'public'`); | ||
} | ||
|
||
async down(queryRunner) { | ||
await queryRunner.query(`ALTER TABLE "note" DROP COLUMN "searchableBy"`); | ||
await queryRunner.query(`DROP TYPE "note_searchableBy_enum"`); | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
packages/backend/migration/1725891731600-SearchbleByNull.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
export class SearchbleByNull1725891731600 { | ||
name = 'SearchbleByNull1725891731600' | ||
|
||
async up(queryRunner) { | ||
await queryRunner.query(`ALTER TABLE "note" ALTER COLUMN "searchableBy" DROP NOT NULL`); | ||
} | ||
|
||
async down(queryRunner) { | ||
await queryRunner.query(`ALTER TABLE "note" ALTER COLUMN "searchableBy" SET NOT NULL`); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.