Diogo Peralta Cordeiro
d6f31d102a
[CORE][ActivityStreamsTwo][ActivityPub] Set all routes
...
Allow global routes to act for every actor
Fix Favoured stream query
2021-09-18 05:12:15 +01:00
Hugo Sales
8f0a3e4977
[UI] Add mechanism for rendering note contents in different formats. Implement plaintext rendering. Use rendered field for note content, rather than the content itself
2021-09-18 05:12:06 +01:00
Hugo Sales
bebf4fdbce
[I18n][Posting] Move ':' to inside the translate call
2021-09-14 13:13:45 +01:00
Diogo Peralta Cordeiro
7c465bba5f
[NOTE] Add mimetype to notes
2021-09-14 13:13:45 +01:00
Hugo Sales
0cecc67376
[COMPONENT][Posting][Link] Create ProcessNoteContent
event. Move link extraction to Link component. Cleanup Posting
2021-09-14 13:13:42 +01:00
Hugo Sales
add8f4a52f
[TOOLS] Fix all errors found by PHPStan level 1
2021-09-14 13:13:42 +01:00
Eliseu Amaro
6ef07e04d1
[Posting][CSS] Right panel form uses a select box instead of radio buttons. Hover and focus of <a> elements using just an underline. Note author and actions padding redone. File-picker font is now correct. Left panel hierarchy should now be more clear.
2021-09-14 13:13:38 +01:00
Hugo Sales
033c4db914
[MODULES] Add function to defer module initialization and cleanup to plugin and component. Add example in Avatar component
...
Forward onInitializeModule to onInitializePlugin if the component is a plugin
2021-09-14 13:13:37 +01:00
Hugo Sales
4d3da08b1e
[CONFIG] Add example module configuration
2021-09-14 13:13:36 +01:00
Diogo Peralta Cordeiro
9739cc5f21
[Posting] Respect process_links setting
2021-09-14 13:13:36 +01:00
Diogo Peralta Cordeiro
ab142ab52d
[FileQuota] Update plugin to respect the new entities
2021-09-14 13:13:35 +01:00
Hugo Sales
458b6d0009
[UI] Rename all forms to more specific names, to avoid form name collisions
2021-09-14 13:13:33 +01:00
Diogo Peralta Cordeiro
de444a2a5a
[Posting] Fix wrong usage of DB::findBy
2021-09-14 13:13:31 +01:00
Diogo Peralta Cordeiro
41b42407cd
[Posting] Store uploaded filenames as titles
2021-09-14 13:13:31 +01:00
Diogo Peralta Cordeiro
036e9cb58e
[Avatar] Preserve uploaded filename and use Avatar's own route instead of attachment
2021-09-14 13:13:30 +01:00
Diogo Peralta Cordeiro
9e4cac0123
[ENTITY] Refactor RemoteURL entities to Link
...
RemoteURL was being an awfully confusing term.
2021-09-14 13:13:26 +01:00
Diogo Peralta Cordeiro
4cc4523632
[Posting] Re-add original file to attachment on upload, if it was previously removed
2021-09-14 13:13:26 +01:00
Diogo Peralta Cordeiro
75f70f8182
[ENTITY][Posting] Remove GSActorToRemoteURL, Fix URL database store
2021-09-14 13:13:25 +01:00
Diogo Peralta Cordeiro
f5175cc59d
[ATTACHMENTS] Always store in the same location
2021-09-14 13:13:24 +01:00
Diogo Peralta Cordeiro
3f61537140
[ENTITY] Split Attachment in various new entities
...
Remove Attachment Scope
Fixed some minor bugs
Scope will be implemented later in v3. It doesn't make sense to have
the scope handling being per attachment. Different actors can post
the same attachment with different scopes. The attachment controller
will assume the highest level of scope applied to the attachment and
the rest will be handled at the note level.
Motivation:
* Remove title from attachment, as it's part of the relation between attachment and note.
* Remove actor from attachment, many actors may publish the same attachment.
* Remove is_local from attachment, as it's part of the relation between attachment and note.
* Remove remote_url from attachment, different urls can return the same attachment.
Addition:
* Attachment now has a lives attribute, it's a reference counter with a nicer name
* GSActorToAttachment
* GSActorToRemoteURL
* RemoteURL
* RemoteURLToNote
* RemoteURLToAttachment
* AttachmentToNote now has a title attribute
2021-09-14 13:13:24 +01:00
Hugo Sales
39006fb6b5
[DB][Attachments] Use count function rathar than fetch and count, rename to refCount, rather than countDepencies
2021-09-14 13:13:24 +01:00
Diogo Peralta Cordeiro
a77f51dd06
[Avatar] Delete attachment only if safe
2021-09-14 13:13:21 +01:00
Diogo Peralta Cordeiro
21362d1e4d
[ATTACHMENTS] Add dependencies counter
2021-09-14 13:13:21 +01:00
Diogo Peralta Cordeiro
0c612bddbe
[Avatar] Store as regular attachments
2021-09-14 13:13:21 +01:00
Diogo Peralta Cordeiro
3334aca7b9
[Avatar] Move entity from core to component
2021-09-14 13:13:20 +01:00
Hugo Sales
88dd9e542f
[CORE][GSFile] Change actor_id paramenter of validateAndStoreFileAsAttachment to optional and reorder them and their usages
2021-09-14 13:13:17 +01:00
Eliseu Amaro
c8a8e94d48
[SETTINGS][PLUGIN][CONTROLLER] Populate profile tabs event added. Settings base template populated with such event for plugins and components.
...
Signed-off-by: Eliseu Amaro <mail@eliseuama.ro>
2021-09-14 13:13:12 +01:00
Diogo Peralta Cordeiro
861732176e
[Media] Support any kind of thumbnails in the Core
...
Sanitize Attachments instead of Validate (part 1)
Ensure the intended filetypes and mimetypes during Vips conversions (part 1)
Various bug fixes
2021-09-14 13:13:03 +01:00
Diogo Peralta Cordeiro
488e700fab
[POSTING] Make it possible for plugins to change the placeholder string
2021-09-14 13:13:03 +01:00
Diogo Peralta Cordeiro
c8cf8c3f13
[FILE][TemporaryFile] Fix various issues now that we also have Symfony's file abstractions
2021-09-14 13:13:03 +01:00
Hugo Sales
d31c3b1784
[AUTOGENERATED] Update autogenerated code
2021-09-14 13:13:01 +01:00
Hugo Sales
2b83a4b627
[UTILS][TemporaryFile] Change way TemporaryFile takes arguments and it's internal implementation
2021-09-14 13:12:58 +01:00
Diogo Peralta Cordeiro
ab060332f0
[Posting] Don't sanitize on storage
...
We prefer to have the original input in database and sanitize on output when appropriate
2021-09-14 13:12:57 +01:00
Diogo Peralta Cordeiro
8f43c8b405
[AUTOGENERATED] Update auto generated code
2021-09-14 13:12:57 +01:00
Diogo Peralta Cordeiro
c9090e6cee
[ATTACHMENTS][GSFile] Rename ValidateAndStore functions
2021-09-14 13:12:56 +01:00
Hugo Sales
353595eb97
[Posting] Add missing default visibility option
2021-09-14 13:12:55 +01:00
Hugo Sales
d11615ded6
[Avatar][Embed] Change use of TemporaryFile::getPath to getRealPath
2021-09-14 13:12:55 +01:00
Hugo Sales
e9b2b18093
[Avatar] Implement avatar deletion
2021-09-14 13:12:53 +01:00
Hugo Sales
2ec7059076
[AVATAR] Move avatar settings page to Avatar component
2021-09-14 13:12:53 +01:00
Diogo Peralta Cordeiro
cbd383f92d
[RIGHT] Introduce component abstraction
2021-09-14 13:12:53 +01:00
Hugo Sales
aea8639d44
[ATTACHMENTS] Restrict thumbnail generation to allowed sizes. Defaults to only configured sizes, but can be extended with the event 'GetAllowedThumbnailSizes'. The intention is to prevent DoS attacks, since handling a thumbnail request is a relatively slow process
2021-09-14 13:12:53 +01:00
Hugo Sales
a7ef2babe6
[AUTOGENERATED] Update autogenerated code
2021-09-14 13:12:52 +01:00
Hugo Sales
34059a8d3d
[ATTACHMENTS][EVENT] Add onHashFile event, which can be used to deduplicate files
...
Currently, we simply hash the contents of the file with sha256, but in the future we can use something smarter,
which could find visual feature similarity between images
2021-09-14 13:12:51 +01:00
Hugo Sales
e94df546c3
[Posting] Extract and store URLs from note content. Introduce 'AttachmentStoreNew' event
2021-09-14 13:12:23 +01:00
Diogo Peralta Cordeiro
0eaccc32fe
[ATTACHMENTS] Further refactoring
...
Some key points:
- Components and Plugins shouldn't extend Module directly
- Avatars should be fetched via GSActor ID, not by nickname as that isn't unique
- Avatar now is a separate Component
- Common file utilities are now to be placed in Core\GSFile, this will
handle storage and trigger validation
- Some bug fixes
2021-09-14 13:11:51 +01:00
Hugo Sales
4358656c55
[ImageThumbnail] Implement image resizing with Intervention/Image
2021-09-14 13:11:50 +01:00
Hugo Sales
c053e8da8e
[Posting] Rename file to attachment and cache result of actor tag query
2021-09-14 13:11:50 +01:00
Hugo Sales
5579f4fa5d
[MEDIA] Rename File to Attachment
2021-09-14 13:11:50 +01:00
Hugo Sales
c44443b52c
[AUTOGENERATED] Update autogenerated code
2021-09-14 13:11:50 +01:00
Diogo Peralta Cordeiro
ccf3aa990a
[MODULES] Introduce the concept of abstract modules to V3
...
Introduce placeholder for abstract upload and thumb modules
Temporarily supress some bugs
2021-09-14 13:11:45 +01:00