Open tastytea opened 2 years ago
Can you try replying if you remove or shorten the content warning on your reply?
Can you try replying if you remove or shorten the content warning on your reply?
Yes, removing or shortening the CW works.
Then the issue is not about being able to reply, since it is possible.
It might be a good idea to detect the particular error in the client to show a better error message.
Then the issue is not about being able to reply, since it is possible.
Well, yeah. If you know what the error is and if you're willing to truncate metadata.
It might be a good idea to detect the particular error in the client to show a better error message.
The response to POST /api/notes/create
was 400 Bad Request
with this body:
{
"error": {
"message": "Invalid param.",
"code": "INVALID_PARAM",
"id": "3d81ceae-475f-4600-b2a8-2bc126157542",
"kind": "client",
"info": {
"param": "#/properties/cw/maxLength",
"reason": "must NOT have more than 100 characters"
}
}
}
Maybe the info
part could be included in the popup?
I get that there has to be some kind of limit, but maybe it should be a little higher? Or not apply to replies?
Maybe the
info
part could be included in the popup?
I was thinking of checking exactly that info
part and if it has the value as above, then show a more specific message (that can also be internationalized).
I get that there has to be some kind of limit, but maybe it should be a little higher?
I am not familiar why the limit is what it is. Going back in the commit history I got to this point https://github.com/misskey-dev/misskey/blame/59785ea04cee105ac0188c5090f81b570c0c2b08/packages/backend/src/models/repositories/note.ts#L15-L17 although I think that it might have been present at an earlier date as well. That commit was made by @syuilo, so maybe he can comment on why the length is 100. My own opinion is also that it is a bit short.
Or not apply to replies?
That will not work with the API validators.
Since it is intended to be used as a short annotation, 100 characters should be sufficient.
I looked around a bit, and found no other content warnings over 100 characters, most are way shorter. It seems to me that a higher limit would not lead to everyone making use of it, but it would increase compatibility in rare cases.
*These English/Japanese sentences are same meaning.
(240 characters) First of all, it takes about twice as many characters to write a sentence in English as it does in Japanese. It is true that writing more than 100 characters in CW in Japanese may be a rare case, but it may be insufficient in English.
(99 characters) そもそも日本語で文章を書くのと比べ英語の場合、約2倍程度の文字数を必要とします。確かにCWで100文字以上を日本語で書くことはレアケースかもしれませんが、英語では不足することはあるかもしれません。
related: #7211
triage: 生きている。
折衷案: UTF-8換算で300バイトまでに制限するのはどうでしょう?
FYI: db的には上限は512になってる
💡 Summary
I wanted to reply to a note but got the error “Invalid param” with no further explanation. Turns out i can't reply to notes with content warnings with more than 100 characters.
Mastodon does not have a limit, so content warnings could be 499 chars on a normal instance and much longer on instances with higher overall character limit.
🥰 Expected Behavior
I can reply to the note with the CW intact.
🤬 Actual Behavior
Error popup with “Invalid param”.
📝 Steps to Reproduce
📌 Environment
Misskey version: 12.110.1 Your OS: Gentoo Linux Your browser: Firefox 91.9.1esr