Commit Graph

372 Commits

Author SHA1 Message Date
Hugo Sales 2fd46ca886
[TOOLS] Continue raising PHPStan level to 6 2022-10-19 22:39:17 +01:00
Hugo Sales edeee49af9
[TOOLS] Fix errors pointed out by PHPStan level 4 2022-10-19 22:38:49 +01:00
Hugo Sales ca9945a4be
[ENTITY][Actor][COMPONENT][Tag] Add `Actor->getNoteTags(?string $note_type)` which gets a cached list of NoteTags for notes of type $note_type for the actor 2022-04-01 00:11:01 +01:00
Hugo Sales 483983790a
[CORE][Router] Rename \App\Core\Router\Router to \App\Core\Router and merge \App\Core\Router\RouteLoader with \App\Core\Router 2022-03-28 20:59:15 +01:00
Hugo Sales abe35428da
[CORE][DB] Rename App\Core\DB\DB to App\Core\DB 2022-03-28 20:59:14 +01:00
Diogo Peralta Cordeiro 16f51e5143
[COMPONENT][Notification] ->getSubscribers() should not be pre-included
Notification bug fix on Subscription component
Correct docblock
2022-03-28 20:53:19 +01:00
Diogo Peralta Cordeiro 888c3798b7
[COMPONENT][Notification] Make logic more generic and robust
Fixed various bugs

Some important concepts to bear in mind:

* Notification: Associated with activities, won't be reconstructed
together with objects, can be thought of as transient

* Attention: Associated with objects, will be reconstructed with them, can
be thought as persistent

* Notifications and Attentions have no direct implications.

* Mentions are a specific form of attentions in notes, leads to the creation of Attentions.

Finally,

Potential PHP issue detected and reported: https://github.com/php/php-src/issues/8199
`static::method()` from a non static context (such as a class method) calls `__call`, rather than
the expected `__callStatic`. Can be fixed by using `(static fn() => static::method())()`, but the
usage of the magic method is strictly unnecessary in this case.
2022-03-14 11:37:09 +00:00
Hugo Sales cf05d3dbb0
[ENTITY][TESTS] Fix Note->isVisibleTo with and associated test 2022-03-13 15:03:03 +00:00
Diogo Peralta Cordeiro 893d299e29
[UTIL][Common] Respect detect language setting
Minor bug fix
2022-03-09 14:24:50 +00:00
Diogo Peralta Cordeiro cac68a6372
[TESTS] Fix Entity/NoteTest 2022-03-09 01:42:11 +00:00
Diogo Peralta Cordeiro 28453c585f
[COMPONENT][Attachment][TESTS] Fix Entity/AttachmentThumbnailTest 2022-03-09 01:42:11 +00:00
Diogo Peralta Cordeiro cc4f967186
[TESTS] Fix Circle SelfTags Setting test 2022-03-09 01:40:35 +00:00
Diogo Peralta Cordeiro 416665d830
[COMPONENT][Attachment][TESTS] Fix Controller/AttachmentTest 2022-03-09 01:40:09 +00:00
Hugo Sales 46de2d47e9
[TOOLS] Add explicit return types to fix deprecation warnings raised by PHPUnit 2022-03-09 01:37:10 +00:00
Hugo Sales d5f90a1206
[ENTITY][Note][CONFIG] Use getListPartialCache for getReplies. Add feeds/cached_replies config entry to control how many replies get cached 2022-02-28 15:47:38 +00:00
Hugo Sales 45c7888676
[TOOLS] Run CS-Fixer on whole project 2022-02-28 15:47:37 +00:00
Hugo Sales 255c44bbf0
[ENTITY][LocalUser] Don't use FILTER_SANITIZE_EMAIL, use just want to validate. Up to the user to fix any errors. Use setter, rather than duplicate it's code 2022-02-28 15:47:37 +00:00
Hugo Sales 5188a473d0
[TOOLS] Fix errors reported by PHPStan 2022-02-28 15:47:37 +00:00
Diogo Peralta Cordeiro 5495a3c5ec
[ENTITY][Note] NoteType now becomes a varchar as predicted 2022-02-27 02:04:48 +00:00
Diogo Peralta Cordeiro a9b34b75b6
[PLUGIN][TreeNotes] Correct cache issues and iterate functionality
- Replies ordering now correct
- Replies count added
- Posting adds new replies to cache (when concerning replies cache is not empty) and increments replies count
- Configuration to specify number of in-tree replies shown added
- TreeNotes templates was moved from core to plugin
- Button to read more replies was added
2022-02-27 01:46:25 +00:00
Diogo Peralta Cordeiro d5731e6351
[COMPONENT][Notification] Consider attention properly in notes 2022-02-25 13:12:16 +00:00
Diogo Peralta Cordeiro 2d5fac7a89
[COMPONENT][Notification] Re-introduce the concept of note attention
Minor refactoring and bug fixing
2022-02-16 18:53:08 +00:00
Diogo Peralta Cordeiro f66e178dfc
[CORE][Actor][Settings] Fix nickname change and refactor Core Form::handle so it's harder to repeat these mistakes again
Minor improvements on actor->getLocal
2022-02-16 18:53:07 +00:00
Diogo Peralta Cordeiro 54b9ec48b4
[COMPONENT][Collection][FeedController] Fix group scope, we should use the IN context actor to check the group 2022-02-16 18:53:07 +00:00
Diogo Peralta Cordeiro bf23ae2dcf
[ENTITY][Note] Some notes aren't exactly just a note but rather a Page, or further (like happening or poll), this is only initial support for that
It prolly will become a varchar instead of an enum, so plugins can add their own note types
2022-02-16 18:53:06 +00:00
Diogo Peralta Cordeiro 3f9c86f0df
[COMPONENT][Group] More flexible member roles than only isAdmin
Refactor terminology of canAdmin to match current roles system
2022-02-14 05:02:10 +00:00
Diogo Peralta Cordeiro 62bf788b90
[CORE][Note] Implement private group scope properly 2022-02-13 23:14:59 +00:00
Diogo Peralta Cordeiro 17733f32d6
[PLUGIN][ActivityPub] Implement Group Outbox
Fix various minor issues
2022-02-11 10:06:01 +00:00
Diogo Peralta Cordeiro 416451a519
[CORE][Actor] Simplify logic so more is reused between different types of actors
Minor bug fixes
2022-02-11 00:27:03 +00:00
Diogo Peralta Cordeiro 1f1524c2b3
[GROUP] Simplify logic by making Actor::Organisation a type of Actor::Group
Some minor bug fixes
2022-02-11 00:26:43 +00:00
Eliseu Amaro 4dd976eb22
[ENTITY][Note] Added function getRenderedSplit, return an array of paragraphs/line breaks
[PLUGINS][Favourite] Foreign keys now properly defined on schema

[CARDS][Note] Note text is now hidden by default if too many paragraphs/line breaks are present, BlogCollection plugin will certainly need this feature
2022-02-04 16:07:24 +00:00
Eliseu Amaro 5036b72a71
[ENTITY][Actor] Nickname is lower case transformed when generating 'actor_view_nickname', making sure that actor pages are linked accordingly 2022-01-27 17:19:50 +00:00
Eliseu Amaro 1576d253a5
[CONTROLLER][UserPanel] Email is now sanitized and validated before calling corresponding setter 2022-01-27 16:59:43 +00:00
Diogo Peralta Cordeiro 6b1c6f603e
[CORE][ActorLocalRoles] Improve Roles 2022-01-22 18:47:56 +00:00
Diogo Peralta Cordeiro bdeb3bcff5
[PLUGIN][ActivityPub] Federate Actor of types other than Person
Fix some other minor bugs
2022-01-21 22:05:31 +00:00
Diogo Peralta Cordeiro 23d45ffab7
[UTIL][Formatting] Mention prefix was hardcoded, fixed. 2022-01-21 21:03:09 +00:00
Hugo Sales 145c88d43f
[ENTITY][Note] Only attempt to find mentions if we have content 2022-01-21 21:03:08 +00:00
José Marques d713429d88
[CORE][Nickname] Properly set nickname for existing accounts 2022-01-10 11:33:13 +00:00
Diogo Peralta Cordeiro e056920de4
[COMPONENT][Subscription] Fix Notifications 2022-01-06 12:13:11 +00:00
Eliseu Amaro 0c245fcb6e
[COMPONENTS][Subscription] Subscribe Actor action implemented
[TWIG] AddProfileAction event added
[CARDS][Profile] Refactor and restyling to accomodate Actor actions
2022-01-06 12:13:10 +00:00
Diogo Peralta Cordeiro cd6ce3542e
[COMPONENT][Circle] Move circles to a component, various bug fixes
Mention links are now correct
2022-01-05 04:19:22 +00:00
Diogo Peralta Cordeiro 627d92b290
[COMPONENT][Tag] Improve Note Tag Handling and start extracting Circles logic out of the plugin, various bug fixes 2022-01-05 01:30:02 +00:00
Hugo Sales 7d38c927e1
[ENTITY][Note][CACHE] Consolidate cache keys to helper function and add ensureCanInteract 2022-01-03 21:20:26 +00:00
Hugo Sales a9ea49d34c
[TOOLS][DOC] Add documentation to functions flagged by doc-check 2022-01-03 02:23:06 +00:00
Diogo Peralta Cordeiro 6cfb69d64b
[COMPONENT][Subscription] Start component 2022-01-03 02:18:44 +00:00
Diogo Peralta Cordeiro def5f36c25
[PLUGIN][ActivityPub][Inbox] Accept Follow Activity
Improve how Core Activity is handled in general
2022-01-02 23:50:16 +00:00
Eliseu Amaro e7940a21ee
[PLUGINS][TreeNotes] Feed only shows each note and its respective direct
replies, conversation shows whole tree

[COMPONENTS][Feed] Added request to FormatNoteList event

Every single Note that was provided to FeedController::postProcess is
shown. This means, that even though the Feed is formatted to show only a
Note and its respective direct replies, those same replies are shown
individually again (and they get the chance to show their own direct
replies).

The Note list provided to FormatNoteList is reversed, and for every
index, the respective Note replies are filtered out of the original list.
The replies are then added as leafs of the current Note and added to the tree.
2022-01-01 21:42:47 +00:00
Eliseu Amaro ba078b7b76
[ENTITY][Note] Caching note replies query
[COMPONENTS][Conversation] Reply route will now present a more suitable title
2021-12-31 17:54:06 +00:00
Hugo Sales 5f4968ac05
[ENTITY][Note][CACHE] Store lists as lists in the cache 2021-12-30 18:28:57 +00:00
Hugo Sales cbb70a5054
[COMPONENT][Feed] Refactor Feed component 2021-12-30 18:28:56 +00:00