New devices can be registered using the postDeviceToken gRPC method, sending a device_token which is then stored for a given user in the Device table in the db. Whenever a new lecture is uploaded / a TUM-Live Worker notifies gocast of a finished lecture upload, a fcm notification is then triggered which sends out a push notification to all device tokens owned by the users enrolled in the stream's course.
Motivation and Context
Adds push notification using Firebase Cloud Messaging for whenever a new lecture is uploaded. Solves https://github.com/TUM-Dev/gocast_mobile/issues/73
Description
New devices can be registered using the postDeviceToken gRPC method, sending a
device_token
which is then stored for a given user in theDevice
table in the db. Whenever a new lecture is uploaded / a TUM-Live Worker notifies gocast of a finished lecture upload, a fcm notification is then triggered which sends out a push notification to all device tokens owned by the users enrolled in the stream's course.Changes related to push notifications:
tools/config.go
model/user.go
dao/courses.go
config.yaml
[api/worker_grpc.go]()
cmd/tumlive/tumlive.go
go.mod
Steps for Testing
See the documentation in our Postman collection and this push notification setup guide.