Commit Graph

49 Commits

Author SHA1 Message Date
naskya c19c439ac1
fix (backend): add hasPoll to packed note 2024-04-18 05:08:14 +09:00
naskya 0f3126196f
refactor (backend): port reaction-lib to backend-rs 2024-04-15 10:02:44 +09:00
naskya beb16ab9cf
refactor (backend): port nyaify to backend-rs 2024-04-12 11:10:42 +09:00
Nyan Helsing a98a26e901 chore: format
Co-authored-by: deathg.rip <josh@deathg.rip>
2024-03-28 05:25:33 +00:00
naskya 391328f128
chore: remove nyaification of 'nA' 2024-03-01 07:56:05 +09:00
ThatOneCalculator 623cadf981
Revert "chore: lint import order"
This reverts commit 8d3c35c0c6.
2023-12-04 23:12:10 -08:00
ThatOneCalculator 8d3c35c0c6
chore: lint import order 2023-11-26 12:33:46 -08:00
naskya 3ba12772d8
bring back Chinese cat mode 2023-09-24 18:12:29 +09:00
naskya 0928a3d93a
chore: remove unused import 2023-09-24 12:38:17 +09:00
Essem 4a7bad11c6 feat: Add post language data to backend and API 2023-09-22 01:29:33 +00:00
ThatOneCalculator 6e8aa76f2d
chore: 🎨 format 2023-09-20 23:30:19 -07:00
ThatOneCalculator d9274de0a7
refactor: ♻️ unessicary function 2023-09-20 22:53:00 -07:00
ThatOneCalculator bbb2396d89
refactor: 💥 properly deprecate legacy reactions 2023-09-20 22:48:50 -07:00
ThatOneCalculator b13e0b0a54
Revert "refactor: 🔥 remove legacy reactions"
This reverts commit c119abc36c.
2023-09-20 22:42:37 -07:00
ThatOneCalculator 05b7fd0fc5
Merge branch 'develop' of git.joinfirefish.org:firefish/firefish into develop 2023-09-20 22:35:14 -07:00
ThatOneCalculator baba9b068b
fix: 🐛 properly decode reaction 2023-09-20 22:35:10 -07:00
naskya e31f86aa19 chore: change function name
I used `detectLanguage_` in client just because I wanted to use the name `detectLanguage` for another function (and the name `detect` sounds ambiguous)
2023-09-21 05:30:13 +00:00
ThatOneCalculator f81baa373c
chore: 🎨 format 2023-09-20 21:20:22 -07:00
ThatOneCalculator c119abc36c
refactor: 🔥 remove legacy reactions
BREAKING: Breaks emoji reaction compatibility with Misskey versions before custom reactions were added (v9?)
2023-09-20 20:48:13 -07:00
ThatOneCalculator 71ea5c4f93
rm langdetect 2023-09-19 17:18:00 -07:00
ThatOneCalculator 414f6df104
simplify 2023-09-19 17:15:13 -07:00
ThatOneCalculator 5964a10571
cld -> tinyld 2023-09-19 17:11:37 -07:00
cg sama 90f01edddc Adding language filter feature
Co-authored-by: CGsama <CGsama@outlook.com>
2023-09-20 00:07:41 +00:00
Namekuji 4c9153fd14
add refresh button to poll 2023-06-18 17:14:38 -04:00
ThatOneCalculator 911704d6a8
chore: formatting 2023-05-25 19:47:10 -07:00
Freeplay 3f58162cf4 Fix polls & own reactions not showing in replies 2023-05-25 15:49:39 -04:00
Kaity A 6eed038028
fix poll voting causing edit revisions. 2023-05-01 03:17:38 +10:00
Kaity A 627a71701f
Implement inbound note edit federation 2023-05-01 02:29:50 +10:00
Kaity A a66eac0e5b
Separate cat-avatar mode and speak-as-cat nyanification 2023-04-02 21:24:12 +10:00
ThatOneCalculator e9b45260b5
chore: 🎨 format 2023-04-01 21:10:31 -07:00
kabo2468 b717f6d6ff
fix: don't nyaize quoted text 2023-03-31 23:30:57 +09:00
ThatOneCalculator d5cafde7d1
Revert "refactor: nyaize on the frontend"
This reverts commit aff90b3ef2.
2023-03-23 09:06:32 -07:00
ThatOneCalculator aff90b3ef2
refactor: nyaize on the frontend 2023-03-19 19:59:00 -07:00
ThatOneCalculator fcc59cd35f
chore: Rome Formatting 2023-02-10 15:41:19 -08:00
cutestnekoaqua 717aa899b1
feat: v1 Mastodon API
This commit adds (maybe unstable) support for Mastodons v1 api
also some v2 endpoints, maybe I miss stuff, I dont know.
We will need to test this but it should be kinda stable
and work like (old) butter.

Co-authored-by: Natty <natty.sh.git@gmail.com>
Co-authored-by: cutls <web-pro@cutls.com>
2023-02-09 23:21:50 +01:00
ThatOneCalculator 6b00abf05c
refactor: 🎨 rome 2023-01-12 20:40:33 -08:00
Johann150 20763a84ee Merge: enhance privacy of notes
https://akkoma.dev/FoundKeyGang/FoundKey/pulls/14
2022-07-25 13:36:44 -07:00
Johann150 7db09103e7
chore: synchronize visibility checks (#8687)
* 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
2022-06-11 16:14:44 +09:00
Johann150 804fa33535
refactor: improve code quality (#8751)
* 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.
2022-05-29 15:15:52 +09:00
Johann150 8d5c9e96e4
fix: assume remote users are following each other (#8734)
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.
2022-05-25 23:17:00 +09:00
syuilo bc2c40a6ca refactor and performance improvements 2022-03-26 17:19:27 +09:00
syuilo 1c67c26bd8
refactor: migrate to typeorm 3.0 (#8443)
* wip

* wip

* wip

* Update following.ts

* wip

* wip

* wip

* Update resolve-user.ts

* maxQueryExecutionTime

* wip

* wip
2022-03-26 15:34:00 +09:00
syuilo d071d18dd7
refactor: Use ESM (#8358)
* wip

* wip

* fix

* clean up

* Update tsconfig.json

* Update activitypub.ts

* wip
2022-02-27 11:07:39 +09:00
syuilo f003289816 refactor 2022-02-25 20:03:17 +09:00
syuilo 510de87607
refactor: use ajv instead of cafy (#8324)
* 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>
2022-02-19 14:05:32 +09:00
tamaina efb0ffc4ec
refactor: 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 97dc9bfa70.

* Revert "Fix API Schema Error"

This reverts commit 21b6176d97.

* ✌️

* clean up

* test?

* wip

* wip

* better schema def

* ✌️

* 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

* ✌️

* なんかもういろいろ

* remove

* very good schema

* api schema

* wip

* refactor: awaitAllの型定義を変えてみる

* fix

* specify types in awaitAll

* specify types in awaitAll

* ✌️

* wip

* ...

* ✌️

* 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

* ✌️

* wip

* 分割代入ではなくallOfで定義するように

Co-authored-by: Acid Chicken (硫酸鶏) <root@acid-chicken.com>
2022-01-18 22:27:10 +09:00
syuilo c69b72e199 fix lint 2021-12-09 23:58:30 +09:00
syuilo 6496835515 viaMobileフラグ廃止
Close #7965
2021-11-12 15:11:20 +09:00
syuilo 0e4a111f81 refactoring
Resolve #7779
2021-11-12 02:02:25 +09:00
Renamed from src/models/repositories/note.ts (Browse further)