This is a Matrix Push Gateway following the Matrix Specification / Push Gateway API, This Push Gateway should archive the Problems we got with Matrix Sygnal.
Report usage to LICENSES.md with template.
go-licenses report ./... --template ./third_party/go-licenses/licenses.tpl > LICENSES.MD 2> errorsChecking for forbidden and unknown licenses usage:
go-licenses check ./... 2> errorsmake docker-build IMG=matrix-go-push:v0.0.1make docker-build-gitlabci IMG=matrix-go-push:v0.0.1The minimum configuration, that has to be done, is to set the ClientID from our app into the config.yaml
Server:
Host: 0.0.0.0
Port: 8080
Timeout:
Server: 30s
Read: 15s
Write: 15s
Idle: 5s
Clients:
- de.test.timref.messengerclient# Create Firebase Serviceaccount Token
mkdir develop
touch develop/serviceAccountKey.json
# Start the Container
docker run -p 8080:8080 -v $(pwd)/config/config.yaml:/config/config.yaml -v $(pwd)/develop/serviceAccountKey.json:/develop/serviceAccountKey.json matrix-go-push:v0.0.1 -config "config/config.yaml"# Create Firebase Serviceaccount Token
mkdir develop
touch develop/serviceAccountKey.json
# Start the Container
docker compose up# Create Firebase Serviceaccount Token
mkdir develop
touch develop/serviceAccountKey.json
# Start the Application
go run ./... -config config/config.yamlYou need to get a PushKey from synapse Database:
select * from pushers;After you got a Pushkey, you can insert the Pushkey in the Curl Request, you need the registered APP_ID in the folowwing curl request and in the config.yaml
curl -i -H "Content-Type: application/json" --request POST -d '@-' 127.0.0.1:8080/_matrix/push/v1/notify <<EOF
{
"notification": {
"event_id": "\$3957tyerfgewrf384",
"room_id": "!slw48wfj34rtnrf:example.org",
"type": "m.room.message",
"sender": "@hmueller:matrix.example.org",
"sender_display_name": "Major Tom",
"room_name": "Mission Control",
"room_alias": "#exampleroom:example.org",
"prio": "high",
"content": {
"msgtype": "m.text",
"body": "I'm floating in a most peculiar way."
},
"counts": {
"unread": 2,
"missed_calls": 1
},
"devices": [
{
"app_id": "de.test.timref.messengerclient",
"pushkey": "$PUSHKEY",
"pushkey_ts": 12345678,
"data": {},
"tweaks": {
"sound": "bing"
}
}
]
}
}
EOF---
title: Messenger Proxy
---
flowchart TB
matrix-server --> matrix-go-push
matrix-go-push --> google-firebase
google-firebase --> checkDeviceType{Is Android?}
checkDeviceType -->|YES| push-to-android-device
checkDeviceType -->|NO| APNS
APNS --> push-to-ios-device
