Commit Graph

13 Commits

Author SHA1 Message Date
Diogo Peralta Cordeiro ae7516c893
[ATTACHMENTS] Always store in the same location 2021-08-14 17:00:48 +01:00
Diogo Peralta Cordeiro 32ad5dbd74
[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-08-14 17:00:46 +01:00
Diogo Peralta Cordeiro 289eef5cf7
[Avatar] Store as regular attachments 2021-08-05 03:24:21 +01:00
Diogo Peralta Cordeiro 5896f5bb82
[Avatar] Move entity from core to component 2021-08-05 03:23:05 +01:00
Hugo Sales 4297eb71a0
[CORE][GSFile] Change actor_id paramenter of validateAndStoreFileAsAttachment to optional and reorder them and their usages 2021-08-03 19:23:02 +00:00
Eliseu Amaro efeb4b4ffe [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-08-03 19:02:39 +01:00
Diogo Peralta Cordeiro 4d2131808a [FILE][TemporaryFile] Fix various issues now that we also have Symfony's file abstractions 2021-07-20 23:46:18 +01:00
Hugo Sales b99fab00e9 [UTILS][TemporaryFile] Change way TemporaryFile takes arguments and it's internal implementation 2021-05-02 15:48:33 +00:00
Diogo Peralta Cordeiro ced6e236ce [ATTACHMENTS][GSFile] Rename ValidateAndStore functions 2021-05-01 23:57:51 +01:00
Hugo Sales ebfa0e2240 [Avatar][Embed] Change use of TemporaryFile::getPath to getRealPath 2021-04-30 23:08:08 +01:00
Hugo Sales c57a8481b1 [Avatar] Implement avatar deletion 2021-04-29 20:36:50 +00:00
Hugo Sales ec0c551bb3 [AVATAR] Move avatar settings page to Avatar component 2021-04-29 18:14:49 +00:00
Diogo Peralta Cordeiro 0f52638a80 [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-04-19 13:21:32 +01:00