New Webhooks #6

Open
opened 2024-01-29 17:16:41 +00:00 by emacsen · 2 comments
emacsen commented 2024-01-29 17:16:41 +00:00 (Migrated from gitlab.com)

Create new webhooks for projects like ActivityColander/Wispwot.

Please include examples of webhook POST JSON payloads.

Create new webhooks for projects like ActivityColander/Wispwot. Please include examples of webhook POST JSON payloads.
emacsen commented 2024-01-29 17:16:41 +00:00 (Migrated from gitlab.com)

assigned to @CSDUMMI

assigned to @CSDUMMI
CSDUMMI commented 2024-01-29 18:09:35 +00:00 (Migrated from gitlab.com)

The JSON payloads sent to the endpoints look like this:

Created

block.created

{
    "event": "block.created",
    "created_at": "2024-01-15T19:22:28.134Z",
    "object": {
        "id": 1,
        "created_at": "2024-01-15T19:22:28.025Z",
        "updated_at": "2024-01-15T19:22:28.025Z",
        "account_id": 110482205265885150,
        "target_account_id": 111484398945680759,
        "uri": "https://<mastodon.example>/68e9cf81-ec5e-40ab-a775-1e510c83fcea"
    }
}

follow.created

{
    "event": "follow.created",
    "created_at": "2024-01-15T19:22:46.080Z",
    "object": {
        "id": 1,
        "created_at": "2024-01-15T19:22:46.014Z",
        "updated_at": "2024-01-15T19:22:46.014Z",
        "account_id": 110482205265885150,
        "target_account_id": 111484398945680759,
        "show_reblogs": true,
        "uri": "https://<mastodon.example>/8cbcffcc-14a2-4f1f-baa9-15cb42af78a2",
        "notify": false,
        "languages": null
    }
}

mute.created

{
    "event": "mute.created",
    "created_at": "2024-01-15T19:22:59.911Z",
    "object": {
        "id": 1,
        "created_at": "2024-01-15T19:22:59.899Z",
        "updated_at": "2024-01-15T19:22:59.899Z",
        "hide_notifications": true,
        "account_id": 110482205265885150,
        "target_account_id": 111484398945680759,
        "expires_at": null
    }
}

Removed

follow.removed

{
    "event": "follow.removed",
    "created_at": "2024-01-26T20:38:33.163Z",
    "object": {
        "account_id": 111824124643125311,
        "target_account_id": 111824112819598830,
        "id": 3
    }
}

mute.removed

{
    "event": "mute.removed",
    "created_at": "2024-01-26T20:38:33.163Z",
    "object": {
        "account_id": 111824124643125311,
        "target_account_id": 111824112819598830,
        "id": 1
    }
}

block.removed

{
    "event": "block.removed",
    "created_at": "2024-01-26T20:38:33.163Z",
    "object": {
        "account_id": 111824124643125311,
        "target_account_id": 111824112819598830,
        "id": 1
    }
}

See these PR for progress on merging them upstream:
*.removed Webhooks
*.created Webhooks

The JSON payloads sent to the endpoints look like this: ## Created ### `block.created` ```json { "event": "block.created", "created_at": "2024-01-15T19:22:28.134Z", "object": { "id": 1, "created_at": "2024-01-15T19:22:28.025Z", "updated_at": "2024-01-15T19:22:28.025Z", "account_id": 110482205265885150, "target_account_id": 111484398945680759, "uri": "https://<mastodon.example>/68e9cf81-ec5e-40ab-a775-1e510c83fcea" } } ``` ### `follow.created` ```json { "event": "follow.created", "created_at": "2024-01-15T19:22:46.080Z", "object": { "id": 1, "created_at": "2024-01-15T19:22:46.014Z", "updated_at": "2024-01-15T19:22:46.014Z", "account_id": 110482205265885150, "target_account_id": 111484398945680759, "show_reblogs": true, "uri": "https://<mastodon.example>/8cbcffcc-14a2-4f1f-baa9-15cb42af78a2", "notify": false, "languages": null } } ``` ### `mute.created` ```json { "event": "mute.created", "created_at": "2024-01-15T19:22:59.911Z", "object": { "id": 1, "created_at": "2024-01-15T19:22:59.899Z", "updated_at": "2024-01-15T19:22:59.899Z", "hide_notifications": true, "account_id": 110482205265885150, "target_account_id": 111484398945680759, "expires_at": null } } ``` ## Removed ### `follow.removed` ```json { "event": "follow.removed", "created_at": "2024-01-26T20:38:33.163Z", "object": { "account_id": 111824124643125311, "target_account_id": 111824112819598830, "id": 3 } } ``` ### `mute.removed` ```json { "event": "mute.removed", "created_at": "2024-01-26T20:38:33.163Z", "object": { "account_id": 111824124643125311, "target_account_id": 111824112819598830, "id": 1 } } ``` ### `block.removed` ```json { "event": "block.removed", "created_at": "2024-01-26T20:38:33.163Z", "object": { "account_id": 111824124643125311, "target_account_id": 111824112819598830, "id": 1 } } ``` See these PR for progress on merging them upstream: [*.removed Webhooks](https://github.com/mastodon/mastodon/pull/28958) [*.created Webhooks](https://github.com/mastodon/mastodon/pull/28744)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
babka/mastodon-babka#6
No description provided.