Commit graph

216 commits

Author SHA1 Message Date
PrivateGER
206f7bfc09 Add high performance batch imports 2023-05-28 00:27:16 +00:00
PrivateGER
090b5724b4 Fix wrong parameter ordering 2023-05-28 00:27:16 +00:00
PrivateGER
99b4e5e13c Implement Meilisearch Indexing 2023-05-28 00:27:16 +00:00
ThatOneCalculator
b082822075 email padding 2023-05-10 14:29:43 -07:00
ThatOneCalculator
3519bffbbc improve emails 2023-05-10 14:27:46 -07:00
ThatOneCalculator
39c6949321 chore: formatting 2023-05-08 13:01:06 -07:00
April John
2a69ade176 fix: dont stream hidden posts 2023-05-08 19:33:04 +02:00
April John
f950c33f79 fix: Detach push notifications..
..from "isRead" check. Apps will handle that theself.
2023-05-08 11:36:32 +02:00
April John
c6d432b2d2 fix hidden post behavior 2023-05-08 11:23:30 +02:00
ThatOneCalculator
52e67728c1 Revert "fix: hidden post federation"
This reverts commit 8a51c73fe705d4c86886ae6b5cc2b9a8dd7dcfb8.
2023-05-07 18:01:36 -07:00
ThatOneCalculator
82a4bcd3a8 chore: formatting 2023-05-07 12:29:02 -07:00
ThatOneCalculator
1fd815beea Revert "Merge pull request 'Add support for CW boosting' (#10047) from supakaity/hajkey:hk/cw-boost into develop"
This reverts commit 5e86bafb24a714f3351da0a205bc57f54332e33c, reversing
changes made to d1977fc3204e16523b3c94be2a2b1878f18dca56.
2023-05-07 11:38:39 -07:00
Kaity A
febb84645f pnpm format 2023-05-07 11:53:01 +10:00
trollo
3ccf069d82 fix: hidden post federation 2023-05-06 18:27:42 +02:00
ThatOneCalculator
c8ec5f324d chore: format 2023-05-05 13:29:39 -07:00
naskya
4bb2751460 Merge branch 'develop' into fix/word-mutes 2023-05-05 14:01:14 +00:00
April John
13b5a0052e Feat: new internal post visibility "hidden" 2023-05-05 15:16:10 +02:00
naskya
0e80f59dc6 I believe I finally solved the boost hard mute issue (took 3 hours) 2023-05-05 15:32:47 +09:00
naskya
4207ff51e7 Merge branch 'develop' into fix/word-mutes 2023-05-04 05:36:29 +00:00
naskya
775eb75428 Differentiate soft mutes and hard mutes 2023-05-04 14:20:06 +09:00
naskya
d09fc8be2b Refactor hard word mutes 2023-05-04 13:17:37 +09:00
Namekuji
03d9642d4b don't update if renoted by bot 2023-05-03 16:16:34 -04:00
Kaity A
5bfe6c0730 Merge remote-tracking branch 'origin/develop' into hk/edit-federation 2023-05-02 18:24:54 +10:00
Namekuji
5013111bee enforce follow-request from silenced users 2023-04-30 21:43:56 -04:00
Namekuji
faa5fc5dd4 suppress notification from silenced users and instances 2023-04-30 21:35:10 -04:00
Namekuji
ec97ccd4c3 do not notify if the target is not following 2023-04-30 19:46:02 -04:00
Namekuji
2072d41fcd Merge branch 'develop' into instance-silence 2023-04-30 17:52:05 -04:00
ThatOneCalculator
1eb19b6988 fix(ap): Use unique identifier for each follow request
Closes #9677

Co-authored-by: GitHub <hutchisr>
2023-04-30 13:26:51 -07:00
Kaity A
6a509637d5 Implement inbound note edit federation 2023-05-01 02:29:50 +10:00
Namekuji
c35f03832d format 2023-04-30 08:08:45 -04:00
Namekuji
ada759a9e5 rename and comment 2023-04-30 07:58:03 -04:00
Namekuji
ce60660128 instance silence 2023-04-30 07:27:55 -04:00
ThatOneCalculator
7d48709b40 fix: style email with inline styles 2023-04-26 20:21:30 -07:00
ThatOneCalculator
3c5fbb7b0b try to fix email style... 2023-04-26 20:04:58 -07:00
ThatOneCalculator
dbc25ce574 email styling 2023-04-19 21:26:49 -07:00
Kainoa Kanter
37d82c3b75 Merge pull request 'feat: give reason for soft word mutes' (#9815) from amybones/calckey:feat_soft_mute_reasons into develop
Reviewed-on: https://codeberg.org/calckey/calckey/pulls/9815
2023-04-07 05:07:24 +00:00
Kainoa Kanter
d92cfb8cdf formatting 2023-04-06 18:56:46 -07:00
amy bones
3819e921cc feat: give reason for soft mutes
Bad UX when a post is muted and it just says "Some chick said something". Now
provide some context too to help people decide if they want to view something
potentially triggering.
2023-04-05 21:28:26 -07:00
ThatOneCalculator
3e7d64ac4b feat: push notifs button
Co-authored-by: Tamania <tamaina@hotmail.co.jp>
2023-04-03 20:36:59 -07:00
amy bones
3f3bf0a9e7 fix: changing passwords, 2fa, and password resets.
The argon2 usage was only implemented for sign-ins which broke a bunch of other
endpoints and features.
2023-04-03 05:14:50 -07:00
ThatOneCalculator
33718bdd5d chore: 🎨 format 2023-04-01 21:10:31 -07:00
Kaitlyn Allan
a86f8d4911 Improve performance of charts
Fix some undefined !== deleted issues
2023-04-01 21:42:03 +10:00
Kaity A
77c12cba8d Add sonic full-text search support (#9714)
This pull request adds support for the [sonic](https://github.com/valeriansaliou/sonic) full text indexing server into Calckey.

In addition to this, a stateful endpoint has been added that will completely (re-)index all notes into any (elasticsearch and/or sonic) indexing server defined in your config at `/api/admin/search/index-all`. It can (optionally) take input data to define the starting point, such as:

```
{"cursor": "9beg3lx6ad"}
```

Currently if both sonic and elasticsearch are defined in the config, sonic will take precedence for searching, but both indexes will continue to be updated for new note creations. Future enhancements may include the ability to choose which indexer to use (or combine multiple).

Co-authored-by: Kaitlyn Allan <kaitlyn.allan@enlabs.cloud>
Reviewed-on: https://codeberg.org/calckey/calckey/pulls/9714
Co-authored-by: Kaity A <supakaity@noreply.codeberg.org>
Co-committed-by: Kaity A <supakaity@noreply.codeberg.org>
2023-03-19 08:26:47 +00:00
Kaity A
4c12faacb1 invalidate local user cache on user update 2023-02-12 07:54:59 +00:00
ThatOneCalculator
57aed1fed9 chore: formatting 2023-02-11 17:22:05 -08:00
Kaity A
7091f889ee Enable reply update/display in detailed view. (#9606)
This PR establishes a new replied note stream update for subscribed notes, which gets fired off whenever a note receives a reply and the user is subscribed to the note for updates.

It specifically does not provide note details as part of the update, just the note id of the reply, so that they must go and retrieve the note and be subject to the proper permission and visibility checks.

The detailed note component has then been updated to watch for the replied notification so it can add new replies to the thread as they are created.

This allows both seeing new replies while on the page, and also to see your own replies appear after you post them without having to reload the page.

This PR relies on https://codeberg.org/calckey/calckey.js/pulls/2 to add the replied type to the calkey.js module.

Co-authored-by: Kaity A <supakaity@blahaj.zone>
Reviewed-on: https://codeberg.org/calckey/calckey/pulls/9606
Co-authored-by: Kaity A <supakaity@noreply.codeberg.org>
Co-committed-by: Kaity A <supakaity@noreply.codeberg.org>
2023-02-12 01:19:43 +00:00
ThatOneCalculator
06ee523871 fix: 🐛 following issues
Closes #9544
2023-02-04 12:37:20 -08:00
ThatOneCalculator
40d539ad20 fix 2023-02-01 11:55:45 -08:00
Skystryder
2d5e836e96 Cleaning up image conversions to use webp, and increasing the thumbnail size. 2023-01-28 17:46:03 -08:00
ThatOneCalculator
1da7464ee7 clean up w/ rome 2023-01-16 11:19:20 -08:00
cutestnekoaqua
6b700b152c fix: deliver queue 2023-01-15 02:25:01 +01:00
ThatOneCalculator
ac64087a1e no more eslint 2023-01-12 20:54:33 -08:00
ThatOneCalculator
2aab2de38d refactor: 🎨 rome 2023-01-12 20:40:33 -08:00
Kainoa Kanter
d9d124cbf0 Admin set default reactions (#9404)
Co-authored-by: ThatOneCalculator <kainoa@t1c.dev>
Reviewed-on: https://codeberg.org/calckey/calckey/pulls/9404
2023-01-05 04:06:48 +00:00
Naomi Ahmed
9fcac972bd prevent notifications if the notification contains a note that is muted 2022-12-26 04:19:20 +00:00
Cleo
530664ccbc Merge pull request '[Chore] Partial translating of ActivityPub/Boot code + Formatting' (#9229) from prettykool/calckey:develop into develop
Reviewed-on: https://codeberg.org/calckey/calckey/pulls/9229
2022-12-18 21:01:22 +00:00
chimiana
41158e9224 Fix for #9194, converts webp to png instead of jpg, preserving transparency 2022-12-17 02:26:19 +00:00
PK
52cc014e4d Translate portions of backend/src/remote/activitypub, the suspend-user service, and the boot process.
Some of these weren't translated so I thought I'd do 'em cause why not ¯\_(ツ)_/¯
2022-12-15 12:44:03 -06:00
cutestnekoaqua
0855b6720d WIP move api call 2022-12-08 01:05:07 +01:00
ThatOneCalculator
f3f63a5dc1 AVIF support 2022-11-14 18:53:38 -08:00
Francis Dinh
288f4a01eb use await for notes.countBy 2022-10-26 14:48:37 -07:00
Johann150
49686050cc backend: fix lint "no-throw-literal" 2022-08-04 13:36:37 -07:00
Johann150
d6faae48f2 fix spelling error 2022-08-04 13:34:18 -07:00
Johann150
fed2085138 Merge: enhance privacy of notes
https://akkoma.dev/FoundKeyGang/FoundKey/pulls/14
2022-07-25 13:36:44 -07:00
ThatOneCalculator
a0d98555df More #31748f 2022-07-24 18:36:55 -07:00
ThatOneCalculator
8687b46e18 More Calckey strings 2022-07-19 10:13:17 -07:00
Johann150
278b7a70a7 enhance: read theme color nodeinfo (#8977)
* provide theme color in nodeinfo metadata

* read theme color from nodeinfo

Prefer to read the theme color from the nodeinfo since it is more
performant than performing selector search on a DOM.
2022-07-13 21:06:24 +09:00
MeiMei
41e4505111 Fix crash at startup if TensorFlow is not supported (#8984)
* Lazy loading tensorflow

* CHANGELOG

* CHANGELOG

* Check CPU flags

* .
2022-07-12 10:38:57 +09:00
tamaina
a461625b31 enhance(sw): If receiving a push notification issued more than a day, ignore it. (#8980)
* enhance(sw): ignore old push notification

* ✌️

* 半日

* !==

* 1日
2022-07-10 15:15:21 +09:00
syuilo
638f0eba12 enhance: make active email validation configurable 2022-07-09 15:05:55 +09:00
syuilo
ed5d81859f feat: auto nsfw detection (#8840)
* feat: auto nsfw detection

* ✌️

* Update ja-JP.yml

* Update ja-JP.yml

* ポルノ判定のしきい値を高めに

* エラーハンドリングちゃんとした

* Update ja-JP.yml

* 感度設定を強化

* refactor

* feat: add video support for auto nsfw detection

* rename: image -> media

* .js

* fix: add missing error handling

* fix: use valid pathname instead of using filename due to invalid usage

* perf(nsfw-detection): decode frames

* disable detection of video for some reasons

* perf(nsfw-detection): streamify detection process for video

* disable disallowUploadWhenPredictedAsPorn option

* fix(nsfw-detection): improve reliability

* fix(nsfw-detection): use Math.ceil instead of Math.round

* perf(nsfw-detection): delete tmp frames after used

* fix(nsfw-detection): FSWatcher does not emit ready event

* perf(nsfw-detection): skip black frames

* refactor: strip exists check

* Update package.json

* めっちゃ変えた

* lint

* Update COPYING

* オプションで動画解析できるように

* Update yarn.lock

* Update CHANGELOG.md

Co-authored-by: Acid Chicken (硫酸鶏) <root@acid-chicken.com>
2022-07-07 21:06:37 +09:00
CyberRex
bc49a0e9be Add additional drive capacity change support (#8867)
* Add additional drive capacity change support

* Update packages/backend/src/server/api/endpoints/admin/drive-capacity-override.ts

Co-authored-by: Johann150 <johann@qwertqwefsday.eu>

* 🎨

* show instance default capacity in placeholder

* fix

* update api/drive

* fix

* remove :

* fix lint

Co-authored-by: Johann150 <johann@qwertqwefsday.eu>
Co-authored-by: tamaina <tamaina@hotmail.co.jp>
2022-07-05 00:21:01 +09:00
syuilo
e23e7de453 feat: Log user ips (#8872)
* wip

* store ip and headers

* Update admin-file.vue

* require admin for view ip/headers

* IP (recent) 消した

* admin必須

* opt in

* clean ips periodically

* respect logging setting in drive/files/create
2022-07-02 15:12:11 +09:00
syuilo
4d89a77aef feat: make possible to delete an account by admin
Resolve #8830
2022-06-27 23:49:16 +09:00
Johann150
746f17450f refactor: remove duplicate code (#8895) 2022-06-27 21:48:10 +09:00
Johann150
d78b20ba07 fix lints 2022-06-24 12:44:22 +02:00
MeiMei
5508bd552c fix: GenerateVideoThumbnail (#8825)
* fix: GenerateVideoThumbnail

* CHANGELOG

* fix cleanup

* Revert "fix cleanup"

This reverts commit d54cf8262ac01a3deb6b8dd7689ec144d4d09ea8.
2022-06-14 23:02:14 +09:00
Johann150
ad858dd2e3 fix: missing file name parameter (#8820) 2022-06-13 00:25:06 +09:00
syuilo
6ba668f934 fix(test): make chart tests working 2022-06-05 20:37:24 +09:00
syuilo
3f4101d17b use node 16 2022-06-04 17:26:56 +09:00
Johann150
102012aa9d fix: add id for activitypub follows (#8689)
* add id for activitypub follows

* fix lint

* fix: follower must be local, followee must be remote

Misskey will only use ActivityPub follow requests for users that are local
and are requesting to follow a remote user. This check is to ensure that
this endpoint can not be used by other services or instances.

* fix: missing import

* render block with id

* fix comment
2022-06-04 13:52:42 +09:00
Johann150
8e296b2398 fix: always remove completed tasks (#8771) 2022-05-31 17:54:02 +09:00
Johann150
ec47b46423 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
c2ddc5286c refactor: temporary files (#8713)
* simplify temporary files for thumbnails

Because only a single file will be written to the directory, creating a
separate directory seems unnecessary. If only a temporary file is created,
the code from `createTemp` can be reused here as well.

* refactor: deduplicate code for temporary files/directories

To follow the DRY principle, the same code should not be duplicated
across different files. Instead an already existing function is used.

Because temporary directories are also create in multiple locations,
a function for this is also newly added to reduce duplication.

* fix: clean up identicon temp files

The temporary files for identicons are not reused and can be deleted
after they are fully read. This condition is met when the stream is closed
and so the file can be cleaned up using the events API of the stream.

* fix: ensure cleanup is called when download fails

* fix: ensure cleanup is called in error conditions

This covers import/export queue jobs and is mostly just wrapping all
code in a try...finally statement where the finally runs the cleanup.

* fix: use correct type instead of `any`
2022-05-25 16:50:22 +09:00
Johann150
d6046c75aa fix: wrong type for isVisibleForMe 2022-05-24 10:12:42 +02:00
Johann150
848ac5a75d fix(activitypub): add authorization checks (#8534)
* fix spelling

* fix(activitypub): add authorization checks
2022-05-19 20:40:16 +09:00
Johann150
306b825ae2 enhance: uniform theme color (#8702)
* enhance: make theme color format uniform

All newly fetched instance theme colors will be uniformely formatted
as hashtag followed by 6 hexadecimal digits.

Colors are checked for validity and invalid colors are not handled.

* better input validation for own theme color

* migration to unify theme color formats

Fixes theme colors of other instances as well as the local instance.

* add changelog entry

Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
2022-05-19 09:54:45 +02:00
MeiMei
f0cdc636c4 fix: Unable to generate video thumbnails (#8696)
* fix: Unable to generate video thumbnails

* CHANGELOG
2022-05-19 16:19:23 +09:00
Johann150
370b9deac2 fix _misskey_content of quote renotes (#8533) 2022-05-01 19:23:34 +09:00
tamaina
1df07ded68 feat: Improve Push Notification (#7667)
* clean up

* ev => data

* refactor

* clean up

* add type

* antenna

* channel

* fix

* add Packed type

* add PackedRef

* fix lint

* add emoji schema

* add reversiGame

* add reversiMatching

* remove signin schema (use Signin entity)

* add schemas refs, fix Packed type

* wip PackedHoge => Packed<'Hoge'>

* add Packed type

* note-reaction

* user

* user-group

* user-list

* note

* app, messaging-message

* notification

* drive-file

* drive-folder

* following

* muting

* blocking

* hashtag

* page

* app (with modifying schema)

* import user?

* channel

* antenna

* clip

* gallery-post

* emoji

* Packed

* reversi-matching

* update stream.ts

* https://github.com/misskey-dev/misskey/pull/7769#issuecomment-917542339

* fix lint

* clean up?

* add app

* fix

* nanka iroiro

* wip

* wip

* fix lint

* fix loginId

* fix

* refactor

* refactor

* remove follow action

* clean up

* Revert "remove follow action"

This reverts commit defbb416480905af2150d1c92f10d8e1d1288c0a.

* Revert "clean up"

This reverts commit f94919cb9cff41e274044fc69c56ad36a33974f2.

* remove fetch specification

* renoteの条件追加

* apiFetch => cli

* bypass fetch?

* fix

* refactor: use path alias

* temp: add submodule

* remove submodule

* enhane: unison-reloadに指定したパスに移動できるように

* null

* null

* feat: ログインするアカウントのIDをクエリ文字列で指定する機能

* null

* await?

* rename

* rename

* Update read.ts

* merge

* get-note-summary

* fix

* swパッケージに

* add missing packages

* fix getNoteSummary

* add webpack-cli

* ✌️

* remove plugins

* sw-inject分離したがテストしてない

* fix notification.vue

* remove a blank line

* disconnect intersection observer

* disconnect2

* fix notification.vue

* remove a blank line

* disconnect intersection observer

* disconnect2

* fix

* ✌️

* clean up config

* typesを戻した

* Update packages/client/src/components/notification.vue

Co-authored-by: Acid Chicken (硫酸鶏) <root@acid-chicken.com>

* disconnect

* oops

* Failed to load the script unexpectedly回避
sw.jsとlib.tsを分離してみた

* truncate notification

* Update packages/client/src/ui/_common_/common.vue

Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>

* clean up

* clean up

* キャッシュ対策

* Truncate push notification message

* クライアントがあったらストリームに接続しているということなので通知しない判定の位置を修正

* components/drive-file-thumbnail.vue

* components/drive-select-dialog.vue

* components/drive-window.vue

* merge

* fix

* Service Workerのビルドにesbuildを使うようにする

* return createEmptyNotification()

* fix

* i18n.ts

* update

* ✌️

* remove ts-loader

* fix

* fix

* enhance: Service Workerを常に登録するように

* pollEnded

* URLをsw.jsに戻す

* clean up

Co-authored-by: Acid Chicken (硫酸鶏) <root@acid-chicken.com>
Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
2022-04-30 21:52:07 +09:00
tamaina
83096440cc enhance: ドライブに画像ファイルをアップロードするときオリジナル画像を破棄してwebpublicのみ保持するオプション (#8216)
* wip

* Update packages/client/src/os.ts

Co-authored-by: tamaina <tamaina@hotmail.co.jp>

* メニューをComposition API化、switchアイテム追加
クライアントサイド画像圧縮の準備

* メニュー型定義を分離 (TypeScriptの型支援が効かないので)

* disabled

* make keepOriginal to follow setting value

* ✌️

* fix

* fix

* ✌️

* WEBP

* aaa

* ✌️

* webp

* lazy load browser-image-resizer

* rename

* rename 2

* Fix

* clean up

* add comment

* clean up

* jpeg, pngにもどす

* fix

* fix name

* webpでなくする ただしサムネやプレビューはwebpのまま (テスト)

* 動画サムネイルはjpegに

* エラーハンドリング

* ✌️

* v2.2.1-misskey-beta.2

* browser-image-resizer#v2.2.1-misskey.1

* ✌️

* fix alert

* update browser-image-resizer to v2.2.1-misskey.2

* lockfile

Co-authored-by: mei23 <m@m544.net>
Co-authored-by: MeiMei <30769358+mei23@users.noreply.github.com>
2022-04-28 11:14:03 +09:00
Johann150
0396792209 fix: Promises -> Promise (#8545) 2022-04-25 15:14:13 +09:00
syuilo
4bf45e968e refactor: use structuredClone for deep clone 2022-04-23 12:38:02 +09:00
Johann150
b68ac308ec await promises (#8519) 2022-04-19 18:46:41 +09:00
syuilo
8609c11944 refactor 2022-04-17 21:01:02 +09:00
syuilo
7b21b72c62 improve webhook 2022-04-03 22:36:30 +09:00
syuilo
2e9afc526d fix types 2022-04-03 16:30:22 +09:00
syuilo
f4f6a76ecc chore: fix lint 2022-04-03 15:33:22 +09:00
syuilo
8b2a0a5773 feat: Webhook (#8457)
* feat: introduce webhook

* wip

* wip

* wip

* Update CHANGELOG.md
2022-04-02 15:28:49 +09:00
Johann150
5421d6f659 limit federation of reactions on direct notes (#8448) 2022-03-27 13:57:04 +09:00