Commit Graph

18179 Commits

Author SHA1 Message Date
tenma
c802480d75 [CORE] Add new Notice scope for private messaging
Notice:
- Add MESSAGE_SCOPE scope

lib/*.stream:
- Filter out notices with MESSAGE_SCOPE scope
2019-08-21 16:54:47 +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
c981afcf31 [DOCUMENTATION] Add release notes
Update INSTALL requirements
Update CHANGELOG
Update TODO
2019-08-21 16:54:09 +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
Miguel Dantas
32812c9482 [PLUGINS] Updated and reviewed the Memcached plugin 2019-08-15 22:33:37 +01:00
Miguel Dantas
c70e806d74 [RedisCache] Added README with configuration instructions 2019-08-15 22:33:36 +01:00
Miguel Dantas
05be2e7386 [RedisCache] Fix use of undefined variable 2019-08-14 15:32:36 +01:00
Miguel Dantas
e2e8885ce3 [PLUGINS] Removed direct call of EndCache events on all plugins, as it is now handled by the library 2019-08-14 15:32:35 +01:00
Miguel Dantas
b214d8b6ee [CACHING] Imported Chimo's RedisCache plugin and fixed some small parts 2019-08-14 15:32:35 +01:00
Miguel Dantas
ba98bb9334 [CORE] Fixed small anti-pattern on cache code. Plugins had to throw EndCache events, when this should be done by the library 2019-08-14 15:32:35 +01:00
Miguel Dantas
630a578e1d [COMPOSER] Added predis/predis and updated packages 2019-08-14 15:32:34 +01:00
Miguel Dantas
0bb35d7e7f [LinkPreview] Fix 'no candidate for action "embedproxy"' 2019-08-14 15:32:34 +01:00
tenma
357296baeb [CORE] Fix subscription-related functions from the Profile class
The undifined variable $private_stream, from the User class, was causing
undifined behavior from calling requiresSubscriptionApproval. The is_null
test was added to fix this problem.
2019-08-13 03:01:24 +01:00
Miguel Dantas
bff525d26f [DOCUMENTATION][SYSADMIN][CONFIGURE] x-static-delivery was in the wrong section 2019-08-13 03:00:19 +01:00
Diogo Cordeiro
e4bdb21a54 [NodeInfo] New endpoint and formula for computing active users
Seriously improved documentation
Now NodeInfo 2.0 is available at /api/nodeinfo/2.0.json
For active users we now also consider favourites and recently created accounts
Some further minor bug fixes and full review of the implementation
2019-08-12 05:35:27 +01:00
Diogo Cordeiro
c0ac7f0ac8 [DOCUMENTATION] Late update of CHANGELOG and TODO list 2019-08-12 05:35:26 +01:00
Diogo Cordeiro
eba2fe1624 [DOCUMENTATION][SYSADMIN][CONFIG][profile] Fix default of backup and restore options 2019-08-11 01:11:41 +01:00
Miguel Dantas
0030fe3aeb [REFACTOR] Added explicit return type to all instances of QueueHandler::handle 2019-08-11 01:11:41 +01:00
Miguel Dantas
aaabf82eff [CORE][QUEUE] Error checking and type declaration on handling notice queue events
Patch submitted by XRevan86
2019-08-08 02:44:14 +01:00
Diogo Cordeiro
de91d28f6f [PEAR][DB] Import some new commits
Patch submitted by XRevan86

[DB/pgsql.php] Change pg_exec to pg_query
Encouraged by http://php.net/manual/en/function.pg-query.php and enables
improved monitoring by New Relic (https://newrelic.com)
[DB.php] changed count to empty for php7.2
[DB/common.php] change to array cast for php72

From: https://github.com/pear/DB/
Commits: 7d0ddaff, d04a42a5 and ea9fff4a, respectively
2019-08-08 02:44:14 +01:00
Diogo Cordeiro
24d5d200b8 [EXTLIB][VALIDATE] Fix some types 2019-08-08 02:44:13 +01:00
Miguel Dantas
573ba2ee43 [DOCUMENTATION] Added X-Sendfile/X-Accel-Redirect to the sample nginx and apache config files 2019-08-08 02:44:13 +01:00
Diogo Cordeiro
b4fced4bd7 [DOCUMENTATION] Add versioning information
Some other minor improvements and a bug fix in the boilerplate
2019-08-08 02:44:07 +01:00
Miguel Dantas
52310a8ad8 [Embed] Fixed error related to oembed action 2019-08-07 23:57:40 +01:00
Diogo Cordeiro
11d203c54a [DOCUMENTATION] Fix nginx location rule's regex for install and index 2019-08-07 23:57:36 +01:00
biodantas
723f12923c Merge branch 'master' of biodantas/gnu-social into master 2019-08-03 20:04:14 +00:00
Miguel Dantas
8b106dbc6c [MEDIA] Fixed wrong image cropping 2019-08-03 21:02:21 +01:00
Miguel Dantas
955d5a136f [MEDIA] Replaced internal image handling with intervention/image, which is capable of using both GD and ImageMagik 2019-08-03 17:49:37 +01:00
Miguel Dantas
2db3825940 [CORE][COMPOSER] Added intervention/image 2019-08-03 17:49:37 +01:00
Diogo Cordeiro
db3253e5d2 [CORE] Bump PHP requirement to PHP7.3+ 2019-08-03 17:49:36 +01:00
Miguel Dantas
dbde8383c9 [Embed] Fixed use of undefined variable in fixup_files script 2019-08-03 17:49:36 +01:00
Miguel Dantas
6d552f15b6 [Embed] Resize thumbnails fetched by Embed to avoid keeping original images when we need only 128x128. Size configurable in config.php 2019-08-03 17:49:36 +01:00
Miguel Dantas
ba15724a62 [FORMAT][Embed] Ran php-cs-fixer on Embed's files and small style fixes 2019-08-03 17:49:33 +01:00