* move truncate function to separate file to reuse it
* truncate image descriptions
* show image description limit in UI
* correctly treat null
Co-authored-by: nullobsi <me@nullob.si>
* make truncate Unicode-aware
The strings that truncate returns should now be valid Unicode.
PostgreSQL also counts Unicode Code Points instead of bytes so this
should be correct.
* move truncate to internal, validate in API
Truncating could also be done in src/services/drive/add-file.ts or
src/services/drive/upload-from-url.ts but those would also affect
local images. But local images should result in a hard error if the
image comment is too long.
* avoid overwriting
Co-authored-by: nullobsi <me@nullob.si>
* truncate user information if it is too long
Some AP software allows for user names or summaries to be very long.
Misskey can not handle this and the profile page can not be opened and
no activities from such users can be seen.
Instead, the user name and summary are cut off after the maximum length
so misskey can still process the activities of the profile.
Co-authored-by: Toast <toast@toast.cafe>
* fix code style
Co-authored-by: Toast <toast@toast.cafe>
Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
* AP Actorの修正
* Add ActivityPub test
* Fix person
* Test
* ap test
* Revert "Test"
This reverts commit 3c493eff4e89f94fd33f25189ba3bc96ef4366b3.
* Test comment
* fix
* fix
* Update inbox
* indent
* nl
* indent
* TODO
* Fix inbox
* Update test
* recieve image descriptions under the name property
* fix other components
* use comment for alt and title
* allow editing of file comment
* allow editing of file comment in note dialog
* federate note comments
* use file instead of this
* backend should accept comment on update
* update now actually accepts comment
* allow multiline descriptions
* image should also have description attached
* Update locales/ja-JP.yml
Co-authored-by: rinsuki <428rinsuki+git@gmail.com>
* Use custom component with side-by-side image
* improve usability on mobile devices
* revert changes
* Update post-form-attaches.vue
* Update drive.file.vue
* Update media-caption.vue
Co-authored-by: rinsuki <428rinsuki+git@gmail.com>
Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>