Commit graph

42 commits

Author SHA1 Message Date
Yannis Vogel
6cf9a030a4
added queue support and paths-refactoring
- added php-resque for queue job and worker support
- removed all document_root dependencies (as that doesn't work in the queue-environment
- added project_root global variable for more robust setup
- some file-constistency fixed
- config referring paths are now starting in project-root
- inbox now does the heavy-duty on a queue
2025-05-15 17:39:12 +02:00
Sascha Nitsch
49a4bee76a small bug fixes 2025-05-07 17:01:11 +02:00
Yannis Vogel
da18d37a79
very rudimental follower-support
- fixed rewrites to properly support @username/outbox, username/outbox, users/username/outbox, ...
- initial support for sending follow to e.g. mastodon (code commented out in api.php)
- database migration for follows table and fedusers table
- save retrieved fedusers in cache and db
- depend more on configs externaldomain, less on server_name
- properly implemented following-logic in dio
- made postForuUser static in newContent and inbox
- provide rsaprivate for signing reuests -> actPub-Servers
- change contenttype depending on use-case
- changed user json-template to have loop-back between user-template and webfinger (mastodon f.e. needs this)
2025-05-07 07:57:04 +02:00
Yannis Vogel
ce7aa5c72d
remove debug/todos for live tests 2025-04-30 22:49:20 +02:00
Yannis Vogel
8ea9bdcf9a
major structure rework
- checkSignature for our fqdn now happens in the connector
- cache public key for 1 hour
- change author on some files
- refactored outbox to api/v1/newcontent (CN->Federator communicates to here)
- disabled post for outbox (as that should go to v1/newcontent)
- initial support for receiving votes from CN, not fully working/clean yet
2025-04-30 22:44:50 +02:00
Yannis Vogel
10a3b1e0f9
remove key-files (don't belong in git) and minor cleanup 2025-04-29 07:41:24 +02:00
Yannis Vogel
352377887c
added proper application-signing
- we now check whether the request was sent from contentnation and approve the request with contentnations pub key
- fix issue where inbox wasn't gotten as it also got a username
- rough initial draft of parsing of connector-specific data (plugins/federator/contentnation::jsonToActivity)
- added key paths and headername to config
2025-04-23 21:07:26 +02:00
Yannis Vogel
0edc4c0db6
remove mastodon.ini 2025-04-23 14:02:54 +02:00
Yannis Vogel
21f73fb56f
cleanup and removal of mastodon-integration
- In-&Outbox now use factories to convert data
- initial creation of followers-data (wip, not working)
- fixed some issue where connector would always fail (as we deliberately always pass username@domain and the regex there always fails)
- deleted all mastodon-files (mastodon.ini and mastodon plugin)
- minor fix where toObject of create would override id with an empty string if no url is set
2025-04-23 14:02:20 +02:00
Yannis Vogel
4d36fc3c61
fix remaining phan errors
- also cleaned up dummy
- added new rewrite for apache for sharedInbox (your.fqdn/inbox)
- fixed json-formatting of publicKey when requesting user via api
2025-04-22 14:30:26 +02:00
Yannis Vogel
d9b02bd95b
fix phan errors
fix lots of phan errors, now we only have phan errors left from temporary implementations. These will be fixed in the next commits as we properly re-integrate and remove temporary-code
2025-04-21 21:06:03 +02:00
Yannis Vogel
957b4f5266
fix line endings
fix line endings to be in LF format
2025-04-21 14:56:44 +02:00
Yannis Vogel
64ee4c518f
forgot to clean-up outbox logging as well. 2025-04-17 12:40:50 +02:00
Yannis Vogel
f6d6c74bc6
minor logging cleanup 2025-04-17 12:38:45 +02:00
Yannis Vogel
20c2db4b35
support outbox post
- we can now receive content into outbox (f.e. from contentnation) and post it into the outbox-user-logfile for now
- we now verify post-requests according to ActivityPub standard
- minor bugfix where user specified by passed user-parameter is possibly not included in postForUser-call
2025-04-17 12:13:34 +02:00
Yannis Vogel
305ded4986
WIP inbox-support
- includes hacky following-mechanic in order to simulate a follow on mastodon (not properly working, need to also inject the user this creates into the followers db for the target mastodon-user)
- created endpoint for inbox. SharedInbox is used when no user is provided (/api/federator/fedusers/inbox'), the regular inbox link now works (/users/username/inbox).
- Retrieve all followers of sender and, if they're part of our system, send the activity into their personal inbox
- Support Announce and Undo Activity-Types
- Inbox currently converts to proper ActPub-objects and saves data to log-files
2025-04-15 16:42:46 +02:00
Yannis Vogel
823283183e
minor fixes
- permissions are always lower-case
- revert webfinger changes to initial state
- re-add setFirst and setLast for outbox
- we now save the current host (f.e. https://contentnation.net) to save users with their respective host (a request to fedusers/grumpydevelop will then result in saving the user as grumpydevelop@contentnation.net)
2025-04-10 19:23:09 +02:00
Yannis Vogel
721e37882d
revert to single-connector support
- removed support for multiple connector-plugins
- fixed issue where outbox wasn't properly retrieved from contentnation
2025-04-10 09:02:45 +02:00
Yannis Vogel
1a7b8264a1
fixes for outbox
- mastodon now properly sets available type-attributes
- database should now save user with his platform (as that's the actual unique identifier, plain username isn't)
- properly retrieve items from mastodon and print them on api-call
(example call for mastodon: federator/fedusers/gutenberg_org@mastodon.social/outbox?page=0)
2025-04-09 12:52:27 +02:00
Yannis Vogel
530caa7ea6
initial mastodon support and minor improvements
- reworked plugin handling. Main now registers and keeps all connectors and based on request we select the correct one and pass it (mainly for clean async-request-handling)
- added outbox functionality for mastodon
- changed image-mime-type approach to retrieve mime-type from the url, this way we don't need to store the images on our server/download each image
- added host for connector for better debugging
- minor bug-fixes
2025-04-08 22:03:19 +02:00
Sascha Nitsch
a21345c3c7 updates based on installation feedback 2025-03-27 17:13:50 +01:00
Sascha Nitsch
a79209fbd4 outobx WIP, almost complete 2024-08-03 19:55:50 +02:00
Sascha Nitsch
d208afe899 incomplete support for fetching data from user outbox (only article yet) 2024-08-02 20:13:19 +02:00
Sascha Nitsch
61203001a3 support for user discovery endpoint 2024-07-23 22:46:59 +02:00
Sascha Nitsch
4c8e765a9e new checkbox 2024-07-22 17:39:59 +02:00
Sascha Nitsch
ebf3d05620 support for host-meta file 2024-07-22 17:38:14 +02:00
Sascha Nitsch
fed5224f46 support for nodeinfo 2024-07-22 17:27:48 +02:00
Sascha Nitsch
073fba5312 renamed file to avoid name conflicts 2024-07-22 15:40:16 +02:00
Sascha Nitsch
47f82afcb5 fixed case of no longer existing user 2024-07-22 14:38:28 +02:00
Sascha Nitsch
63532c54ea support for active fetching of user info 2024-07-21 17:02:39 +02:00
Sascha Nitsch
47efd74b6c initial webfinger support 2024-07-20 23:21:27 +02:00
Sascha Nitsch
eed9678dbf fixed wrong date 2024-07-20 21:05:03 +02:00
Sascha Nitsch
c4596ace03 folder restructuring, namespace adjustments 2024-07-20 19:17:36 +02:00
Sascha Nitsch
0d3a7c871b support for local users with extra-data needed for activity-pub 2024-07-19 20:37:09 +02:00
Sascha Nitsch
199922299d mainenance functionality to run database updates for new releases 2024-07-19 18:41:44 +02:00
Sascha Nitsch
a32220442c basic redis cache support 2024-07-17 21:45:33 +02:00
Sascha Nitsch
d96b05a658 fixed errors found by phan 2024-07-17 21:37:02 +02:00
Sascha Nitsch
6ea9c2728f documentation updates
fixed  namespaces
add doygen generation, unhappy with phpDocumentor
2024-07-17 15:45:19 +02:00
Sascha Nitsch
ed84e3be71 more ignores 2024-07-17 11:48:36 +02:00
Sascha Nitsch
3d1713b050 added phpdoc config 2024-07-17 11:48:22 +02:00
Sascha Nitsch
e53f04d0c0 missing cache functions 2024-07-17 11:47:48 +02:00
Sascha Nitsch
ef25c5b3af initial import 2024-07-17 00:03:39 +02:00