Commit Graph

21 Commits

Author SHA1 Message Date
627d92b290
[COMPONENT][Tag] Improve Note Tag Handling and start extracting Circles logic out of the plugin, various bug fixes 2022-01-05 01:30:02 +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
3e83387e98
[PLUGIN][DeleteNote] Support ActivityPub 2021-12-28 16:22:38 +00:00
80afc0fa6c
[TEMPLATES][Cards][Profile] Provide both actor uri and url, as well as full mention guidance 2021-12-27 05:08:27 +00:00
c4dacd7626
[COMPONENT][Attachment] Vinculate note information with attachment controllers
Various minor bug fixes
2021-12-27 04:56:00 +00:00
a1d9909379
[CORE][VisibilityScope] Use enum type instead of Bitmap 2021-12-26 19:16:56 +00:00
ec28f23025
[TOOLS] Run CS-fixer on all files 2021-12-26 19:16:15 +00:00
5e42723624
[ENTITY][Note] Include reply_to's targets in child's 2021-12-26 19:16:14 +00:00
91f8c86efa
[PLUGIN][ActivityPub] Support and federate scopes 2021-12-26 19:16:12 +00:00
d4bc1d097d
[ENTITY][NoteTag][COMPONENT][Language] Add language to NoteTag and minor corrections 2021-12-26 06:22:30 +00:00
78fddaf86a
[PLUGIN][ActivityPub] Notify mentions in tags 2021-12-26 06:22:28 +00:00
9d0b39e680
[PLUGIN][ActivityPub] Support tags in notes 2021-12-25 18:04:31 +00:00
36483a6ecd
[COMPONENT][Link] Ignore html anchors that include mention class 2021-12-25 18:04:30 +00:00
3c79d82b80
[PLUGIN][ActivityPub][Note] Support inReplyTo 2021-12-24 02:46:39 +00:00
1865d2b41e
[ActivityPub][Postman] Fill To and CC with mentions 2021-12-24 00:42:02 +00:00
a9c73a8f33
[PLUGIN][ActivityPub] Add mention tags 2021-12-20 13:32:48 +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
5196b669b9
[PLUGIN][ActivityPub] Add attachment support to Notes 2021-12-05 21:04:20 +00:00
e29e1cc87c
[ENTITY] Rename 'getFrom' to 'getBy' 2021-12-05 17:55:46 +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