Commit graph

823 commits

Author SHA1 Message Date
syuilo
ec6b418a23 update deps 2022-06-10 15:06:42 +09:00
syuilo
b9c64053e8 Merge branch 'develop' of https://github.com/misskey-dev/misskey into develop 2022-06-10 14:56:07 +09:00
syuilo
f5ba73e7c8 chore: tweak logo 2022-06-10 14:56:05 +09:00
5e29528ad4
chore: fix some lints automatically (#8788)
* chore: fix some lints automatically

Fixed lints that were automatically fixable with `eslint --fix`.

* fix type

* workaround for empty interface lint
2022-06-10 14:36:55 +09:00
a683a7092d
enhance(federation): use ActivityPub defined property in favour of proprietary property. (#8787)
* add activitypub `source` property

* parse MFM from new `source` attribute
2022-06-10 14:31:58 +09:00
42f48ffea2
refactor: follow button (#8789)
* fix: display cancelling follow request

* remove unnecessary branch

The executed code is the same as in the else branch so this special
condition is unnecessary.

* remove code duplication

Use the same callback as later for updating these variables.

* use $ref sugar

* remove unused import

Co-authored-by: blackskye-sx <saul.newman@gmail.com>
2022-06-10 14:29:46 +09:00
78df3dc484
enhance: improve documentation for /users/ endpoints (#8790)
* docs: category & description for reset password

* docs: category & description for testing

* docs: descriptions for groups endpoints

* docs: descriptions for drive file endpoints

* docs: descriptions for sw endpoints

* docs: descriptions for user list endpoints

* docs: descriptions & result type for gallery posts

* docs: descriptions & result type for user endpoints

* docs: add return type for stats
2022-06-10 14:25:20 +09:00
7dde0b1362
fix(client): render quote renote CWs as MFM (#8792)
Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
2022-06-09 23:45:16 +09:00
b66e73aed5
fix: use autocomplete=new-password (#8797) 2022-06-09 23:42:00 +09:00
eec7a0a1f6
properly display alt text for videos (#8802)
The alt text is already properly federated and given by the API,
it is just not displayed properly by the client.
2022-06-09 23:35:58 +09:00
4800dd06e5
fix: try to prevent autocomplete for emoji search (#8798) 2022-06-08 20:20:37 +09:00
0fa2a52fac
refactor: use awaitAll to reduce duplication (#8791)
* refactor: use awaitAll to reduce duplication

* fix lint

* fix typo
2022-06-08 17:59:48 +09:00
syuilo
d17298d3b5 fix(test): make chart tests working 2022-06-05 20:37:24 +09:00
syuilo
09b749eb97 Update .mocharc.json 2022-06-05 19:46:52 +09:00
syuilo
5fb3f8a116 chore: lint fixes 2022-06-05 12:26:36 +09:00
syuilo
adf3190859 chore(client): fix menu item style 2022-06-05 12:23:57 +09:00
syuilo
89419c05b2 use node 16 2022-06-04 17:26:56 +09:00
syuilo
abcd5bc951 update summaly 2022-06-04 17:24:41 +09:00
syuilo
71150f21cd Revert "feat: option to collapse long notes (#8561)"
This reverts commit e675ffcf38.
2022-06-04 15:23:53 +09:00
syuilo
11afdf7e24 fix bug 2022-06-04 15:15:44 +09:00
syuilo
702edfd3d3 fix test 2022-06-04 14:25:30 +09:00
Balazs Nadasdi
e675ffcf38
feat: option to collapse long notes (#8561)
* feat: option to collapse long notes

Closes #8559

* do not collapse if cw exists

* use '閉じる' to close / show less.

* make it sticky

* Change style of the Show less button
2022-06-04 13:57:09 +09:00
32dff28460
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
9954c054a7
fix: ensure resolver does not fetch local resources via HTTP(S) (#8733)
* refactor: parseUri types and checks

The type has been refined to better represent what it actually is. Uses of
parseUri are now also checking the parsed object type before resolving.

* cannot resolve URLs with fragments

* also take remaining part of URL into account

Needed for parsing the follows URIs.

* Resolver uses DbResolver for local

* remove unnecessary use of DbResolver

Using DbResolver would mean that the URL is parsed and handled again.
This duplicated processing can be avoided by querying the database directly.

* fix missing property name
2022-06-04 11:29:20 +09:00
81109b14b5
fix: correctly render empty note text (#8746)
Ensure that the _misskey_content attribute will always exist. Because
the API endpoint does not require the existence of the `text` field,
that field may be `undefined`. By using `?? null` it can be ensured
that the value is at least `null`.

Furthermore, the rendered HTML of a note with empty text will also be
the empty string. From git blame it seems that this behaviour was added
because of a Mastodon bug that might have previously existed. Hoever,
this seems to be no longer the case as I can find mastodon posts that
have empty content.

The code could be made a bit more succinct by using the null coercion
operator.
2022-06-03 23:18:44 +09:00
PikaDude
6061937996
User moderation details (#8762)
* add more user details for admins to see

* fix some issues

* small style fix

as suggested by Johann150

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

* fix

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

Co-authored-by: Johann150 <johann@qwertqwefsday.eu>
2022-06-03 23:14:50 +09:00
syuilo
71c230b7b7 Merge branch 'develop' of https://github.com/misskey-dev/misskey into develop 2022-06-03 23:08:18 +09:00
syuilo
a3fed7d0fb fix(test): reset redis in e2e test
#7986
2022-06-03 23:08:15 +09:00
sn0w
df3bbfb416
fix(client): correctly handle MiAuth URLs with query string (#8772) 2022-06-03 21:22:03 +09:00
118f354661
fix: server metrics widget 2022-06-01 08:51:00 +02:00
121a1784a2
fix(lint): indentation 2022-05-31 16:22:00 +02:00
025bf4a5e7
fix(mfm): remove duplicate br tag/newline (#8616) 2022-05-31 18:57:55 +09:00
c56e45ecef
fix: always remove completed tasks (#8771) 2022-05-31 17:54:02 +09:00
MeiMei
c05723ca6a
Fix IP address rate limit (#8758)
* Fix IP address rate limit

* CHANGELOG

* Tune getIpHash
2022-05-31 17:44:22 +09:00
tamaina
857055a9dd chore: fix import tinycolor 2022-05-30 12:09:22 +00:00
tamaina
465531d56c Merge branch 'develop' of https://github.com/misskey-dev/misskey into develop 2022-05-30 05:53:40 +00:00
tamaina
9759ca7d24 chore: remove packages/sw/webpack.config.js 2022-05-30 05:53:36 +00:00
3905185463
fix(client): import shared ESLint config in client package (#8761) 2022-05-30 11:37:34 +09:00
ebc2566130
fix: add missing import
fix #8756
2022-05-29 14:33:42 +02:00
futchitwo
d2784030ec
fix(client): fix popout url (#8494) 2022-05-29 12:21:36 +02:00
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
tamaina
f1d2398eac
fix(client): Vite related boot mechanism revision (#8753)
* preload app css

* remove salt

* APP_FETCH_FAILED error

* set max-age to 15s
2022-05-29 10:58:54 +09:00
tamaina
4917961736
preload app css (#8752) 2022-05-29 10:57:06 +09:00
e54aa56ee1
chore: remove unused imports 2022-05-28 21:17:23 +02:00
21d54f2758
fix: validate text is not empty
fix #8747
2022-05-28 17:26:17 +02:00
tamaina
abc8998b48
refactor: use css module at components/global/loading.vue (#8750)
* refactor: use css module at components/global/loading.vue

* rename class name to "root"
2022-05-29 00:15:32 +09:00
tamaina
4a50c49211
Fix theme import (#8749) 2022-05-28 21:59:23 +09:00
708fba989a
feat(tests): add e2e tests for widgets (#8735)
* test(e2e): add baseline for widget tests

* chore(repo): enable test running in branch

* fix(e2e): set viewport for widget tests

* fix(client): add widget identifier classes to widgets

* test(e2e): add memo widget test

* fix(tests): force select value

* fix(tests): force button press for widget addition

* fix(tests): invoke select value differently

* fix(tests): adjust widget submit

* fix(tests): don't explicitly navigate for widget test

* fix(tests): click label to hide select popup

* fix(tests): just click modal background

* fix(tests): adjust modal background selector

* fix(tests): click all modal backgrounds

* feat(e2e): add test for adding timeline widget

* fix(client): add more widget identifier classes

* feat(tests): add method abstraction for test cases

* fix(tests): force-click overlays

* fix(tests): force widget button press

* fix(tests): remove timeout from final widget check

* feat(tests): add widget removal test case

* fix(client): use mk instead of msky as class prefix

* fix(tests): check widgets for existence rather than visibility

* chore(meta): don't run tests for specific feature branch
2022-05-28 14:28:12 +09:00
161659de5c
enhance: replace signin CAPTCHA with rate limit (#8740)
* enhance: rate limit works without signed in user

* fix: make limit key required for limiter

As before the fallback limiter key will be set from the endpoint name.

* enhance: use limiter for signin

* Revert "CAPTCHA求めるのは2fa認証が無効になっているときだけにした"

This reverts commit 02a43a310f.

* Revert "feat: make captcha required when signin to improve security"

This reverts commit b21b058005.

* fix undefined reference

* fix: better error message

* enhance: only handle prefix of IPv6
2022-05-28 12:06:47 +09:00
63a814c70e
fix(docs): correct information for drive upload (#8736) 2022-05-27 22:03:25 +09:00