Commit Graph

4945 Commits

Author SHA1 Message Date
tenma
f6fd025be2 [AP] Update version info 2019-09-03 03:26:35 +01:00
tenma
b5897687a6 [AP] Prevent postman to include the actor's followers for every sent activity 2019-09-03 03:26:35 +01:00
tenma
ebeae261de [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
2019-09-03 03:26:35 +01:00
tenma
9733f3c02c [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
2019-09-03 03:26:35 +01:00
tenma
217c8a3933 [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
2019-09-03 03:26:35 +01:00
tenma
7188d81ad4 [AP] Properly target public notices
ActivityPubPlugin:
- Use TO as principal audience, CC as secondary
- Update note validation
2019-09-03 03:26:35 +01:00
Miguel Dantas
48cacd6d9d [RedisCache] Added plugin description, fixes 'empty msgid' error 2019-09-03 03:26:35 +01:00
Diogo Cordeiro
1e378a514d [OverwriteThemeBackground] This new plugin will let the admin set a custom background theme independent 2019-09-03 03:26:35 +01:00
Diogo Cordeiro
92ab5e18ee [ExtendedProfile] Fix Admin menu option 2019-08-24 01:59:42 +01:00
Diogo Cordeiro
e1514a151c [DOCUMENTATION][DEVELOPERS][PLUGINS] Some updates to Plugins doc 2019-08-24 01:59:41 +01:00
Diogo Cordeiro
2a82cfdb2a [TagCloud] Add Readme 2019-08-24 01:59:40 +01:00
Diogo Cordeiro
49da433879 [SearchSub][README] No longer is a default plugin since 8614cd77 2019-08-24 01:59:40 +01:00
Diogo Cordeiro
92388e1734 [SamplePlugin] Review and update with the latest GNU social best practices 2019-08-24 01:59:40 +01:00
Diogo Cordeiro
3860c25dc0 [ConversationTree] Format the plugin, add strict typing and fix docblocks 2019-08-24 01:59:39 +01:00
Diogo Cordeiro
25ee5ed1f9 [OfflineBackup] Fix plugin 2019-08-24 01:59:39 +01:00
Diogo Cordeiro
566214ac62 [PLUGINS] Removed OpenX as the service doesn't exist anymore 2019-08-24 01:59:39 +01:00
Diogo Cordeiro
1459f10803 [GroupFavorited] Fix plugin 2019-08-24 01:59:38 +01:00
Diogo Cordeiro
0795a39459 [ExtendedProfile] Hide 'Extra fields' from profile when no field was created by the sysadmin 2019-08-24 01:59:38 +01:00
Diogo Cordeiro
e5831d6807 [ExtendedProfile] Allow to delete custom profile field 2019-08-24 01:59:38 +01:00
Diogo Cordeiro
88bdb5114f [Plugins] Incorporated GNUsocialExtendedProfile as part of ExtendedProfile
Also improved a lot of the plugin and made things in a way it would make sense
2019-08-24 01:59:37 +01:00
Diogo Cordeiro
90bd9088bb [GNUsocialProfileExtensions] Fixed plugin 2019-08-24 01:59:37 +01:00
Diogo Cordeiro
01cf8ab82c [PLUGINS] Removed GNUsocial{Photo, Photos, Video} as we don't need them anymore 2019-08-24 01:59:36 +01:00
Diogo Cordeiro
aee5506f00 [PLUGINS] Removed GeoURL as the service doesn't exist anymore 2019-08-24 01:59:36 +01:00
Diogo Cordeiro
b6183f2de1 [ForceGroup] Modernized plugin and improved documentation 2019-08-24 01:59:36 +01:00
Diogo Cordeiro
2f341a3369 [ChooseTheme] Fixed plugin 2019-08-24 01:59:35 +01:00
Diogo Cordeiro
66e55d1a1f [BlankAd] Fixed plugin 2019-08-24 01:59:34 +01:00
Diogo Cordeiro
63fac32bc0 [Awesomeness] Fixed plugin 2019-08-24 01:59:34 +01:00
Diogo Cordeiro
0c2c3ec862 [CORE] Plugin API now extends a new Module API 2019-08-24 01:59:33 +01:00
Diogo Cordeiro
8c0601816f [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.
2019-08-22 03:13:58 +01:00
Miguel Dantas
350cde08d8 [Embed] Added support for inline images 2019-08-22 03:13:58 +01:00
tenma
db5a29fd9a [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.
2019-08-22 03:13:58 +01:00
Miguel Dantas
2519431f02 [Embed] Added support for inline images 2019-08-21 16:54:46 +01:00
Miguel Dantas
b38e71e544 [Embed] Only resize thumbnail if it's bigger than the desired size 2019-08-21 16:54:46 +01:00
Diogo Cordeiro
eccb8a4faf [ActivityPub] Move models from 'classes' to 'lib/models' 2019-08-21 16:46:39 +01:00
tenma
7fa5ddfc44 [ActivityPub] Fix WebFinger event subscription
ActivityPubPlugin:
- remove reference to the first argument of onEndWebFingerProfileLinks, no need
as it is an object
2019-08-21 16:46:39 +01:00
tenma
054f4e77f5 [ActivityPub] Fix handling of Delete Activity
inbox_handler:
- Call stronger validation method for Delete Activity objects
- Take into account mixed object in handle_delete

Activitypub_delete:
- Add validation method for Delete Activity objects
2019-08-21 16:46:39 +01:00
Diogo Cordeiro
1398d6cc21 [ActivityPub] This is the first release of the plugin 2019-08-21 16:46:38 +01:00
tenma
b902b019fb [ActivityPub] Use queues for notice distribution
ActivityPubPlugin:
- Change event-based notice distribution to queues logic

ActivityPub/lib:
- Add queue handler class activitypubqueuehandler.php

Misc:
- Add documentation for the (Start/End)InitializeQueueManager events
2019-08-21 16:46:38 +01:00
tenma
5e589aba3c [OStatus] Fix notice enqueue
OStatusPlugin:
- Enqueue in the last position, as it should be. No need to worry about
the OMB comment, this protocol no longer have queue handlers that could
cause a conflict.
2019-08-21 16:46:38 +01:00
tenma
c28cee88b7 [ActivityPub] Ensuring federation with other software
ActivityPubPlugin:
- Prevent sending a Delete for an Announce

Activitypub_announce:
- Update announce_to_array to add id, to and cc information to the retrieved object

Activitypub_follow:
- Add id to the arguments of follow_to_array, useful for Accept-Follow activities

Activitypub_notice:
- Fix notice validation, url isn't a MUST

Activitypub_inbox_handler:
- Make handle_follow use the received activity id for the later Accept-Follow

Activitypub_postman:
- Fix call to the updated announce_to_array
- Fix successive unnecessary calls to ActivityPubPlugin::actor_uri()
2019-08-21 16:46:37 +01:00
brunoccast
14a45dc546 [ActivityPub] Fix notice creation
Activitypub_notice:
- Perform url test, use id when missing.
2019-08-21 16:46:37 +01:00
brunoccast
883621ba34 [ActivityPub] Routes
ActivityPubPlugin:
- Update routes to properly use the updated URLMapper
2019-08-21 16:46:37 +01:00
brunoccast
067cc81ebb [ActivityPub] Ensuring notice deletion
ActivityPubPlugin:
- Minor onDeleteOwnNotice rewrite

Activitypub_inbox_handler:
- Add deletion check to incoming notice

Activitypub_postman:
- Call the correct getUrl function
2019-08-21 16:46:37 +01:00
brunoccast
b19ee7b894 [ActivityPub] Ensuring Notice Favor/Disfavor
ActivityPubPlugin:
- Minor re-write of favor/disfavor event handlers

Activitypub_postman:
like/undo-like:
- fix proper getUrl() call
misc:
- make all activities accumulate errors (may be needed later) and log some information about it
2019-08-21 16:46:36 +01:00
brunoccast
1b356d3bf2 [ActivityPub] Ensuring notice distribution
ActivityPubPlugin:
- Fix of accepted activity verbs to include SHARES
- Add attention profiles to delivery when announcing

Activitypub_notice:
- New local function to retrieve original URL
- Removal of unnecessary 'Atom*' attributes
- Small fix to the ensuring of actor profile

Activitypub_profile:
- New local function to fetch AP profiles from a collection

Activitypub_postman:
- Fix url passed in the announce activity
2019-08-21 16:46:36 +01:00
brunoccast
94a4059b4a [ActivityPub] Caching of Following/Followers interactions and collections
Follow interaction:
- Fixed mini-bug where the subscriber profile was being used as the subscribed
- Updated cache subscription-related values in both instances
- Tested and working with local GS instances

Unfollow interaction:
- Updated cache subscription-related values in both instances
- Tested and working with local GS instances

Followers/Following collections:
- Now returning ActivityPub profiles only
- Stored collections in cache

Misc:
- Fix bug concerning the retrieval of public/private-key after in-function generation
2019-08-21 16:46:36 +01:00
brunoccast
735a0023cc [ActivityPub] Routes
ActivityPubPlugin:
- Update routes to properly use URLMapper
- Minor updates
2019-08-21 16:46:36 +01:00
Diogo Cordeiro
2ad4fa99ed [CORE] Add ActivityPub plugin
This is not the same as the one in https://notabug.org/diogo/gnu-social-activitypub-plugin
Differences to the first "release"
-> Doesn't use guzzle nor has any composer dependencies
-> Supports HTTP Signatures
-> Has basic l10n/i18n
-> Some minor bug fixes
2019-08-21 16:46:35 +01:00
Miguel Dantas
c0950c5fc6 [PLUGINS] Dropped Memcache in favor of Memcached. The difference between these is that they use a similarly php library to interact with memcache, but memcached is more modern 2019-08-15 22:33:38 +01:00
Miguel Dantas
afbbbbd4f2 [Memcached] Merged useful features from Memcache 2019-08-15 22:33:37 +01:00