Skip to content

commetchat/voyager

Repository files navigation

Voyager

Serverless push gateway for Matrix

Matrix Mastodon Twitter

Development

This service is built as a Cloudflare Worker. Check out this guide if you are unfamiliar.

API

Voyager is compatable with both, Unified Push and Firebase Cloud Messaging. To maintain compatability with other Unified Push <-> Matrix gateways, it is assumed that by default a request uses Unified Push, unless Firebase is specified.

Request to homeserver to register using FCM

Note the addition of "type": "fcm" to specify that this uses Firebase

{
    "app_id": "chat.commet.commetapp.android",
    "pushkey": "FCM_CLIENT_PUSH_KEY_HERE",
    "app_display_name": "Commet for Android",
    "data": {
        "type": "fcm",
        "format": "event_id_only",
        "url": "http://push.commet.chat/_matrix/push/v1/notify"
    },
    "device_display_name": "Android Phone",
    "kind": "http",
    "lang": "en",
    "profile_tag": ""
}

Example request from homeserver for FCM notification

{
    "notification": {
        "devices": [
            {
                "app_id": "chat.commet.commetapp.android",
                "data": {
                    "type": "fcm"
                },
                "pushkey": "FCM_CLIENT_PUSH_KEY_HERE"
            }
        ],
        "event_id": "$cmfAyePJH4n7AnzWDGlJyS6g3RRkNDOGBTtbnTrWgzs",
        "prio": "high",
        "room_id": "!OGEhHVWSdvArJzumhm:matrix.org"
    }
}

Releases

No releases published

Packages

No packages published