Commit Graph

18227 Commits

Author SHA1 Message Date
tenma 58a9c71391 [AP] Fix subscription events
Both StartSubscribe and StartUnsubscribe had a wrong initial if-condition.
Furthermore, this events were calling Activitypub_profile::from_profile()
which is wrong because it creates the Activitypub_profile object when
the goal is only to check if it exists already.
2021-07-16 19:44:34 +01:00
tenma 6af86536aa [AP] Subscribe RemoteFollow plugin events for allowing following with the remote-follow button 2021-07-16 19:44:34 +01:00
tenma 66c5d17469 [OStatus] Port remote-follow to the RemoteFollow plugin
OStatusPlugin:
- Stop adding the remote-follow button
- Subscribe to required RemoteFollow plugin events
- Drop main/ostatussub route and update urls to the main/RemoteFollowSub route
- Bump plugin minor version number

actions/ostatusgroup,
actions/ostatuspeopletag:
- Update urls to the main/RemoteFollowSub route

lib/util:
- Port required functions from OStatusSubAction and adapt to be used with the new events
2021-07-16 19:44:34 +01:00
tenma 32ae48358d [RemoteFollow] Initial work in the RemoteFollow plugin
lib/default.php
- Add RemoteFollow to the list of default plugins

RemoteFollowPlugin:
- Subscribe events to add the remote-follow button

RemoteFollowInitAction:
- Handles the remote-follow form and getting the redirection url for follow completion

RemoteFollowSubAction:
- Handles the remote profile pulling and actual following
2021-07-16 19:44:34 +01:00
Miguel Dantas d9668a6d07 [URLMAPPER] Fix small bug in URLMapper: a dynamic route might not exist even if a static one does 2021-07-16 19:44:34 +01:00
Miguel Dantas 12172f08d7 [DirectMessage] Fixed use of incorrect type which prevented posting notices with only one word 2021-07-16 19:44:34 +01:00
tenma 84ba14426c [AP] Update version info 2021-07-16 19:44:34 +01:00
tenma 13d7c3debe [AP] Prevent postman to include the actor's followers for every sent activity 2021-07-16 19:44:34 +01:00
tenma 738f9cb89c [AP] Support Private Messaging
ActivityPubPlugin:
- Subscribe DirectMessage events

Activitypub_inbox_handler:
- Update handle_create_note to create private messages

Activitypub_postman:
- Add create_direct_note for sending private messages

Activitypub_create:
- Update create_to_array to support the 'directMessage' attribute
- Add isPrivateNote to verify private activities

Activitypub_notice:
- Update create_note to support the 'directMessage' attribute
- Remove isPrivateNote

lib/models:
- Add Activitypub_message, the model in charge of private notes
2021-07-16 19:44:34 +01:00
tenma 3852ad175f [AP] Fix Follow collections
Activitypub_profile:
- Fix subscription-counter getter functions, invalid profiles were being counted

apActorFollowingAction:
- Small rewrite of generate_following, didn't make sense to not use try-catch block

apActorFollowersAction:
- Small rewrite of generate_followers, didn't make sense to not use try-catch block
2021-07-16 19:44:34 +01:00
tenma 83f179989e [AP] Handle unlisted/followers-only notices
Note that this commit isn't intended to add support for sending such notes
in GS. Instead, we handle the reception, storage and direct reply to this
type of notices, in AP.

ActivityPubPlugin:
- Subscribe the event StartNoticeSave to hack answering non-public notes

Activitypub_create:
- Add 'directMessage' attribute to the Create activity, defaulting to false for now
- Update validation method: validate 'directMessage' and add debug

Activitypub_notice:
- Handle incoming unlisted/followers-only notes
- Add support for unlisted-replies
- Add method to verify private (direct) notices

inbox_handler:
- Add handler for CREATE Note
- Prepare logic for private-messaging
- Overall refactor: Class members were continuously being passed as function arguments without need

SharePlugin:
- Stop showing the announce button in non public posts
2021-07-16 19:44:34 +01:00
tenma 0d9606ffbf [AP] Properly target public notices
ActivityPubPlugin:
- Use TO as principal audience, CC as secondary
- Update note validation
2021-07-16 19:44:34 +01:00
Miguel Dantas 4a56a61094 [RedisCache] Added plugin description, fixes 'empty msgid' error 2021-07-16 19:44:34 +01:00
Diogo Cordeiro 8d9b88a8bc [OverwriteThemeBackground] This new plugin will let the admin set a custom background theme independent 2021-07-16 19:44:34 +01:00
Diogo Cordeiro 616858ea89 [ExtendedProfile] Fix Admin menu option 2021-07-16 19:44:34 +01:00
Diogo Cordeiro 428878b6d8 [MODULES] Allow to delete third party plugins 2021-07-16 19:44:34 +01:00
Diogo Cordeiro 0d7c0069f2 [MODULES] Allow to upload third party plugins
Fixed some bugs
2021-07-16 19:44:34 +01:00
Diogo Cordeiro ca22279797 [MODULES] List all available plugins and allow enabling them via UI
Yet another revision of the Admin Plugin Management tool
2021-07-16 19:44:34 +01:00
Diogo Cordeiro 5524cf331c [DOCUMENTATION][DEVELOPERS][PLUGINS] Some updates to Plugins doc 2021-07-16 19:44:34 +01:00
Diogo Cordeiro a43c10582f [TagCloud] Add Readme 2021-07-16 19:44:34 +01:00
Diogo Cordeiro 8d848683ad [SearchSub][README] No longer is a default plugin since 8614cd77 2021-07-16 19:44:34 +01:00
Diogo Cordeiro 0c6d94fca8 [SamplePlugin] Review and update with the latest GNU social best practices 2021-07-16 19:44:34 +01:00
Diogo Cordeiro 68db757269 [ConversationTree] Format the plugin, add strict typing and fix docblocks 2021-07-16 19:44:34 +01:00
Diogo Cordeiro 76609d8f37 [OfflineBackup] Fix plugin 2021-07-16 19:44:34 +01:00
Diogo Cordeiro 33ac4aed32 [PLUGINS] Removed OpenX as the service doesn't exist anymore 2021-07-16 19:44:34 +01:00
Diogo Cordeiro 2d7ca37036 [GroupFavorited] Fix plugin 2021-07-16 19:44:34 +01:00
Diogo Cordeiro 3bf010ddd8 [ExtendedProfile] Hide 'Extra fields' from profile when no field was created by the sysadmin 2021-07-16 19:44:34 +01:00
Diogo Cordeiro 9a9fa89a0c [ExtendedProfile] Allow to delete custom profile field 2021-07-16 19:44:34 +01:00
Diogo Cordeiro fd1a7a5e68 [Plugins] Incorporated GNUsocialExtendedProfile as part of ExtendedProfile
Also improved a lot of the plugin and made things in a way it would make sense
2021-07-16 19:44:34 +01:00
Diogo Cordeiro c71fa9099f [GNUsocialProfileExtensions] Fixed plugin 2021-07-16 19:44:34 +01:00
Diogo Cordeiro 9bb6fc3f0d [PLUGINS] Removed GNUsocial{Photo, Photos, Video} as we don't need them anymore 2021-07-16 19:44:34 +01:00
Diogo Cordeiro 3909d49982 [PLUGINS] Removed GeoURL as the service doesn't exist anymore 2021-07-16 19:44:34 +01:00
Diogo Cordeiro a4680524a7 [ForceGroup] Modernized plugin and improved documentation 2021-07-16 19:44:34 +01:00
Diogo Cordeiro 5a679ac561 [DEFAULT] Add 'DirectionDetector' as a default plugin 2021-07-16 19:44:33 +01:00
Diogo Cordeiro 66edc49bcf [ChooseTheme] Fixed plugin 2021-07-16 19:44:33 +01:00
Diogo Cordeiro 0ecf9eb649 [BlankAd] Fixed plugin 2021-07-16 19:44:33 +01:00
Diogo Cordeiro 79cce82e50 [Awesomeness] Fixed plugin 2021-07-16 19:44:33 +01:00
Diogo Cordeiro 5ca939fdd2 [DEFAULT] Add 'AccountManager' as a default plugin 2021-07-16 19:44:33 +01:00
Diogo Cordeiro fa28646d43 [CORE] Core modules shouldn't show up in version action 2021-07-16 19:44:33 +01:00
Diogo Cordeiro 20a6f1d4f4 [CORE] Plugin API now extends a new Module API 2021-07-16 19:44:33 +01:00
Diogo Cordeiro 3821d2317e [PLUGIN API] Bug fixes and improvements 2021-07-16 19:44:33 +01:00
Diogo Cordeiro 99fe3e5a52 [CORE] Move plugin superclasses from /lib/ to /lib/modules/ 2021-07-16 19:44:33 +01:00
Diogo Cordeiro c18f26145c [CORE] Move core plugins to a new modules directory
For reference (raised by rozzin in IRC):

* http://foldoc.org/module
* http://foldoc.org/library
* http://foldoc.org/plugin

As noted by XRevan86, modules are not necessarily non-essential.
As we will keep the modules directory in GS root [therefore, near to
plugins/], it is evidenced the difference between both.

This is a simple yet fundamental structural change. It doesn't change
functionality but makes clearer the way we understand GNU social's
internals.
2021-07-16 19:44:33 +01:00
Miguel Dantas 8e7ab891a5 [Embed] Added support for inline images 2021-07-16 19:44:33 +01:00
tenma 0b30d932fc [DirectMessage] Major plugin rework
This commit does the necessary rework to store private messages
as Notices and to support Federation. The plugin's README presents
some more detail about the changes and future work that is still
required to do.
2021-07-16 19:44:33 +01:00
tenma 23512bea14 [CORE][ROUTES] Update urlmapper to search dynamic routes before static ones when generating URLs.
This solves the problem of routes that differ only in having
or not $_GET params. The ones not having params (static) were
being matched first during URL generation.

The way this problem was solved was by separating the $reverse
array in both $reverse_statics and $reverse_dynamics and explicitly
traversing this last one first in the generation function. Note that
maintaining the $reverse array and unshifting dynamic routes to its
head ( and therefore to the front of the static ones ) doesn't work
since even among dynamic routes the order of arrival should be kept.
2021-07-16 19:44:33 +01:00
tenma 06fb856d24 [CORE] Add new Notice scope for private messaging
Notice:
- Add MESSAGE_SCOPE scope

lib/*.stream:
- Filter out notices with MESSAGE_SCOPE scope
2021-07-16 19:44:33 +01:00
Miguel Dantas 9ab13191af [Embed] Added support for inline images 2021-07-16 19:44:33 +01:00
Miguel Dantas bf885fbef8 [Embed] Only resize thumbnail if it's bigger than the desired size 2021-07-16 19:44:33 +01:00
Diogo Cordeiro 233f731296 [DOCUMENTATION] Add release notes
Update INSTALL requirements
Update CHANGELOG
Update TODO
2021-07-16 19:44:33 +01:00