summaryrefslogtreecommitdiff
path: root/packages/backend/src/models (follow)
Commit message (Collapse)AuthorAgeFilesLines
* fix(api): fix instance schemasyuilo2022-06-281-0/+4
|
* fix(api): add missing themeColor property of instancesyuilo2022-06-281-0/+1
|
* tweak clientsyuilo2022-06-212-0/+7
|
* fix(server): faviconUrl of federated instance is missingsyuilo2022-06-212-0/+6
|
* chore: synchronize visibility checks (#8687)Johann1502022-06-111-0/+1
| | | | | | | | | | | | | | * reuse single meId parameter * unify code style Use template string to avoid having to use escaped quote marks. * fix: follower only notes are visible to mentioned users This synchronizes the visibility rules with the Notes.isVisibleForMe method from packages/backend/src/models/repositories/note.ts * add comment
* use node 16syuilo2022-06-041-1/+3
|
* refactor: improve code quality (#8751)Johann1502022-05-292-51/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * remove unnecessary if `Array.prototype.some` already returns a boolean so an if to return true or false is completely unnecessary in this case. * perf: use count instead of find When using `count` instead of `findOneBy`, the data is not unnecessarily loaded. * remove duplicate null check The variable is checked for null in the lines above and the function returns if so. Therefore, it can not be null at this point. * simplify `getJsonSchema` Because the assigned value is `null` and the used keys are only shallow, use of `nestedProperty.set` seems inappropriate. Because the value is not read, the initial for loop can be replaced by a `for..in` loop. Since all keys will be assigned `null`, the condition of the ternary expression in the nested function will always be true. Therefore the recursion case will never happen. With this the nested function can be eliminated. * remove duplicate condition The code above already checks `dragging` and returns if it is truthy. Checking it again later is therefore unnecessary. To make this more obvious the `return` is removed in favour of using an if...else construct. * remove impossible "unknown" time The `ago` variable will always be a number and all non-negative numbers are already covered by other cases, the negative case is handled with `future` so there is no case when `unkown` could be achieved.
* fix: assume remote users are following each other (#8734)Johann1502022-05-251-9/+15
| | | | | | Misskey does not know if two remote users are following each other. Because ActivityPub actions would otherwise fail on followers only notes, we have to assume that two remote users are following each other when an interaction about a remote note occurs.
* chore: synchronize code and database schema (#8577)Johann1502022-05-0511-27/+19
| | | | | | | | | | * chore: remove default null null is always the default value if a table column is nullable, and typeorm's @Column only accepts strings for default. * chore: synchronize code with database schema * chore: sync generated migrations with code
* refactor: use structuredClone for deep clonesyuilo2022-04-231-1/+1
|
* fix ogp rendering and refactorsyuilo2022-04-172-11/+21
|
* refactor: fix typesyuilo2022-04-172-9/+42
|
* fix: validation (better #8456) (#8461)Johann1502022-04-032-0/+2
| | | | | | | | | * Revert "revert 484e023c0" This reverts commit c03b70c949923b830a6d0361d1aa4d5f5614b7b7. * also allow pure renote * fix checks for pure renote
* revert 484e023c0syuilo2022-04-022-2/+0
|
* feat: Webhook (#8457)syuilo2022-04-022-0/+75
| | | | | | | | | | | * feat: introduce webhook * wip * wip * wip * Update CHANGELOG.md
* enhance(doc): required input fields (#8456)Johann1502022-04-022-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * remove empty file If the endpoint is to be implemented later, the file can be added back, but for now it is confusing to have an empty file. * enhance(doc): document defaults Default for `isPublic` is based on the database schema default value. Defaults for `local` and `withFiles` are based on the behaviour of the endpoint. * enhance(doc): explain nullable emoji category * fix: make nullable if default is null * enhance(doc): explain mute attribute expiresAt * fix: define required fields - `notes/create`: the default for `text` has been removed because ajv can not handle `default` inside of `anyOf`, see https://ajv.js.org/guide/modifying-data.html#assigning-defaults and the default value cannot be `null` if text is `nullable: false` in the `anyOf` first alternative. - `notes/create`: The `mediaIds` property has been marked as deprecated because it has the same behaviour as using `fileIds`, but the implementation tries to handlè `fileIds` first. - The result schema for `admin/emoji/list` has been altered because the `host` property will always be `null` as it is filtered this way in the database query. See packages/backend/src/server/api/endpoints/admin/emoji/list.ts line 67. * enhance(doc): explain nullable hostname * update changelog Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
* refactor and performance improvementssyuilo2022-03-261-61/+65
|
* refactor: migrate to typeorm 3.0 (#8443)syuilo2022-03-2632-489/+476
| | | | | | | | | | | | | | | | | | | | | | | * wip * wip * wip * Update following.ts * wip * wip * wip * Update resolve-user.ts * maxQueryExecutionTime * wip * wip
* perf(server): refactor and performance improvementssyuilo2022-03-251-0/+6
|
* perf(server): reduce db querysyuilo2022-03-211-2/+10
|
* delete needless instance drive columnssyuilo2022-03-071-16/+0
|
* feat: アンケート終了通知syuilo2022-03-062-1/+8
| | | | Resolve #4664
* feat: 時限ミュートsyuilo2022-03-043-0/+13
| | | | #7677
* feat: instance default themesyuilo2022-03-011-0/+14
|
* Fix avatar/banner proxy (#8346)tamaina2022-02-275-39/+30
| | | | | | | | | | | | | | | | | | | | * Fix avatar/banner proxy Co-authored-by: mei23 <m@m544.net> * use getAvatarUrl * fix * join avatar and banner to improve performance * join * Update hybrid-timeline.ts * fix Co-authored-by: mei23 <m@m544.net> Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
* refactor: Use ESM (#8358)syuilo2022-02-2795-353/+353
| | | | | | | | | | | | | | | * wip * wip * fix * clean up * Update tsconfig.json * Update activitypub.ts * wip
* refactorsyuilo2022-02-251-3/+3
|
* remove max note text length settingsyuilo2022-02-201-6/+0
| | | | Resolve #8323
* SchemaTypeの型計算量を削減 (#8332)tamaina2022-02-191-1/+1
| | | | | | | | | | | | | * schema typeの型計算量を削減 * reduce some type error * wip * fix * clean up * more shrink
* refactor: use ajv instead of cafy (#8324)syuilo2022-02-194-25/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * wip * wip * Update abuse-user-reports.ts * Update files.ts * Update list-remote.ts * Update list.ts * Update show-users.ts * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * Update update.ts * Update search.ts * Update reactions.ts * Update search.ts * wip * wip * wip * wip * Update update.ts * Update relation.ts * Update available.ts * wip * wip * wip * Update packages/backend/src/server/api/define.ts Co-authored-by: Johann150 <johann.galle@protonmail.com> * Update define.ts * Update define.ts * typo * wip * wip * wip * wip * wip * wip * wip * wip * Update update.ts * wip * Update signup.ts * Update call.ts * minimum for limit * type * remove needless annotation * wip * Update signup.ts * wip * wip * fix * Update create.ts Co-authored-by: Johann150 <johann.galle@protonmail.com>
* refactor: add InstanceRepositorysyuilo2022-02-184-11/+41
|
* enhance(server): add indexes for following hostsyuilo2022-02-111-0/+2
|
* feat: インスタンスのテーマカラーを設定できるようにsyuilo2022-02-091-0/+6
|
* feat: Option to show replies in timeline (rebase #7685) (#8202)nullobsi2022-02-062-0/+7
| | | | | * Add an option for timeline replies. Credit to Emilis (puffaboo) * update db on request
* refactor: use toISOStringsyuilo2022-02-033-3/+3
|
* enhance: convert svg to png of custom emojissyuilo2022-01-212-2/+9
|
* enhance: Forward report (#8001)Johann1502022-01-212-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * implement sending AP Flag object Optionally allow a user to select to forward a report about a remote user to the other instance. This is added in a backwards-compatible way. * add locale string * forward report only for moderators * add switch to moderator UI to forward report * fix report note url * return forwarded status from API apparently forgot to carry this over from my testing environment * object in Flag activity has to be an array For correct interoperability with Pleroma the "object" property of the Flag activity has to be an array. This array will in the future also hold the link to respective notes, so it makes sense to correct this on our side. * Update get-note-menu.ts Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
* feat(server): store mime type of webpublicsyuilo2022-01-201-0/+5
|
* refactor: ↵tamaina2022-01-1846-1570/+1694
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | APIエンドポイントファイルの定義を良い感じにする (#8154) * Fix API Schema Error * Delete SimpleSchema/SimpleObj and Move schemas to dedicated files * Userのスキーマを分割してみる * define packMany type * add , * Ensure enum schema and Make "as const" put once * test? * Revert "test?" This reverts commit 97dc9bfa70851bfb7d1cf38e883f8df20fb78b79. * Revert "Fix API Schema Error" This reverts commit 21b6176d974ed8e3eb73723ad21a105c5d297323. * :v: * clean up * test? * wip * wip * better schema def * :v: * fix * add minLength property * wip * wip * wip * anyOf/oneOf/allOfに対応? ~ relation.ts * refactor! * Define MinimumSchema * wip * wip * anyOf/oneOf/allOfが動作するようにUnionSchemaTypeを修正 * anyOf/oneOf/allOfが動作するようにUnionSchemaTypeを修正 * Update packages/backend/src/misc/schema.ts Co-authored-by: Acid Chicken (硫酸鶏) <root@acid-chicken.com> * fix * array oneOfをより正確な型に * array oneOfをより正確な型に * wip * :v: * なんかもういろいろ * remove * very good schema * api schema * wip * refactor: awaitAllの型定義を変えてみる * fix * specify types in awaitAll * specify types in awaitAll * :v: * wip * ... * :v: * AllowDateはやめておく * 不必要なoptional: false, nullable: falseを廃止 * Packedが展開されないように * 続packed * wip * define note type * wip * UserDetailedをMeDetailedかUserDetailedNotMeかを区別できるように * wip * wip * wip specify user type of other schemas * ok * convertSchemaToOpenApiSchemaを改修 * convertSchemaToOpenApiSchemaを改修 * Fix * fix * :v: * wip * 分割代入ではなくallOfで定義するように Co-authored-by: Acid Chicken (硫酸鶏) <root@acid-chicken.com>
* refactor: more common namesyuilo2022-01-161-1/+1
|
* bye reversisyuilo2022-01-125-432/+0
|
* bye roomsyuilo2022-01-071-0/+1
|
* fix lintsyuilo2021-12-0987-699/+699
|
* feat: user-level instance mute (#7712)romaboo2021-12-092-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Update ja-JP.yml * Added settable config for muted instances * added psql query for removal of muted notes * Added filtering and trimming for instance mutes * cleaned up filtering of bad instance mutes and added a refresh at the end for the list on the client * Added notification & streaming timeline muting * Updated changelog * Added missing semicolon * Apply japanese string suggestions from robflop Co-authored-by: Robin B. <robflop98@outlook.com> * Changed Ja-JP instance mute title string to one suggested by sousuke Co-authored-by: sousuke0422 <sousuke20xx@gmail.com> * Update ja-JP instanceMuteDescription based on sousuke's suggestion Co-authored-by: sousuke0422 <sousuke20xx@gmail.com> * added notification mute * added notification and note children muting * Fixed a bug where local notifications were getting filtered on cold start * Fixed instance mute imports * Fixed not saving/loading instance mutes * removed en-US translations for instance mute * moved instance mute migration to js * changed settings index back to spaces * removed destructuring assignment from notification stream in instance mute check call Co-authored-by: tamaina <tamaina@hotmail.co.jp> * added .note accessor for checking note data instead of notification data * changed note to use Packed<'Note'> instead of any and removed usage of snake case Co-authored-by: tamaina <tamaina@hotmail.co.jp> * changed notification mute check to check specifically for notification host * changed to using single quotes * moved @click to the end for the linter * revert unnecessary changes * restored newlines * whitespace removal Co-authored-by: syuilo <syuilotan@yahoo.co.jp> Co-authored-by: Robin B. <robflop98@outlook.com> Co-authored-by: sousuke0422 <sousuke20xx@gmail.com> Co-authored-by: puffaboo <emilis@jigglypuff.club> Co-authored-by: tamaina <tamaina@hotmail.co.jp>
* fix(server): Fix #8032syuilo2021-12-031-2/+2
|
* fix: 画像ファイルの縦横サイズの取得で Exif Orientation ↵xianon2021-12-032-2/+20
| | | | | | | | | | | を考慮する (#8014) * 画像ファイルの縦横サイズの取得で Exif Orientation を考慮する * test: Add rotate.jpg test * Webpublic 画像を返す時のみ Exif Orientation を考慮して縦横サイズを返す * test: Support orientation
* viaMobileフラグ廃止syuilo2021-11-122-10/+0
| | | | Close #7965
* refactoringsyuilo2021-11-12100-0/+8283
Resolve #7779