Commit Graph

26 Commits

Author SHA1 Message Date
f5e92de62d
[PLUGIN][ActivityPub][Util][Explorer] Simplify fetching Actor by URI 2022-02-25 13:12:14 +00:00
51cccd0155
[PLUGIN][ActivityPub] Simplify DB usage 2022-02-20 05:03:40 +00:00
66323c5a73
[PLUGIN][ActivityPub] Fix several issues with target and notifications inserted by AP 2022-02-13 23:14:59 +00:00
def5f36c25
[PLUGIN][ActivityPub][Inbox] Accept Follow Activity
Improve how Core Activity is handled in general
2022-01-02 23:50:16 +00:00
93276ce8d0
[AUTOGENERATED] Update autogenerated code 2021-12-27 03:06:30 +00:00
c79b1e4c94
[AUTOGENERATED] Update auto generated code 2021-12-26 19:16:15 +00:00
ec28f23025
[TOOLS] Run CS-fixer on all files 2021-12-26 19:16:15 +00:00
a81ac673ac
[CORE][ENTITY] Rename 'Entity::getWithPK' to 'Entity::getByPK' 2021-12-19 19:04:01 +00:00
480a42cca5
[PLUGIN][ActivityPub] Introduce ActivitypubObject. Beware, inside the plugin, an Object can never be an Activity.
Many bug fixes and other major changes (interface changed, see EVENTS.md)
2021-12-08 23:24:23 +00:00
9512890264
[PLUGIN][ActivityPub] Implement Actor Update
Diverse minor bug fixes
2021-12-05 03:11:08 +00:00
778cb57d83
[PLUGIN][ActivityPub] Finish base ActivityStreams 2.0 interface
Instructions below

To extend an Activity properties do:

public function onActivityPubValidateActivityStreamsTwoData(string $type_name, array &$validators): bool {
    if ($type_name === '{Type}') {
        $validators['attribute'] = myValidator::class;
    }
    return Event::next;
}

The Validator should be of the form:

use ActivityPhp\Type;
use ActivityPhp\Type\Util;
use Plugin\ActivityPub\Util\ModelValidator;

class myValidator extends ModelValidator
{
    /**
     * Validate Attribute's value
     *
     * @param mixed $value from JSON's attribute
     * @param mixed $container A {Type}
     * @return bool
     * @throws Exception
     */
    public function validate($value, $container): bool
    {
        // Validate that container is a {Type}
        Util::subclassOf($container, Type\Extended\Object\{Type}::class, true);

        return {Validation Result};

To act on received activities do:

public function onActivityPubNew{Type}(&$obj): bool {

To add information to Activities being federated by ActivityPub do:

public function ActivityPubAddActivityStreamsTwoData(string $type_name, &$type): bool {

To implement an ActivityStreams 2.0 representation do:

public function onActivityPubActivityStreamsTwoResponse(string $route, arrray $vars, ?TypeResponse &$response = null): bool {
        if ($route === '{Object route}') {
                $response = ModelResponse::handle($vars[{Object}]);
                return Event::stop;
        }
        return Event::next;
}
2021-12-04 21:05:07 +00:00
d044039272
[FreeNetwork] Initial multi-protocol support 2021-12-02 14:23:21 +00:00
53c46127c1
[ActivityPub][Explorer] Store remote's url properly 2021-12-02 11:12:03 +00:00
424df54a1b
[ActivityPub] Add HTTP Signatures 2021-12-01 19:47:41 +00:00
123544fa50
[ActivityPub] Port Postman 2021-12-01 19:47:40 +00:00
56526c9ba6
[ActivityPub][Inbox] Restore Create Note Functionality
Minor bug fixes
2021-11-29 22:42:46 +00:00
89d36a68e5
[ENTITY][Actor] Add is_local, it's common to depend, and this makes it much faster, with a low space cost 2021-11-16 23:26:20 +00:00
51c984849f
[ActivityPub] Port Explorer 2021-10-27 04:22:19 +01:00
8fdc52636f
[ActivityPub] Port RSA 2021-10-27 04:19:29 +01:00
9109c61af5
[TOOLS][CS-FIXER] Run new PHP CS Fixer config. Notably, adds strict_types 2021-10-27 04:19:28 +01:00
517ed953f2
[FreeNetwork] First step towards de-duplication mechanism for federation
Refactored AS2 inside AP; [ENTITY][Activity] went from core to AP
Webfinger plugin will be part of FreeNetwork component
2021-10-06 11:48:22 +01:00
ad67358c3b
[ActivityPub] Remove ActivityPub plugin until we're ready to work on it, as it needs significant work 2021-09-14 13:10:51 +01:00
e2e53d9a2a
[AUTOGENERATED] Update auto generated code in entities 2021-09-14 13:06:56 +01:00
460712e15e
[GIT] Change my email to the new one in all files and bump copyright year 2021-09-14 13:06:56 +01:00
Hugo Sales
cc758f6a8e
[AUTOGENERATED] Update autogenerated code in module entities 2021-09-14 13:06:51 +01:00
Hugo Sales
f60bdaa2f0
[DB][MODULES][ActivityPub] Cleanup table definitions 2021-09-14 13:06:45 +01:00