mirror of
https://github.com/commetchat/voyager.git
synced 2026-11-04 02:36:20 +00:00
Serverless push gateway for matrix
- TypeScript 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| src | ||
| .editorconfig | ||
| .gitignore | ||
| .prettierrc | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
| wrangler.toml | ||
Voyager
Serverless push gateway for Matrix
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"
}
}