TUM-Dev / gocast

TUMs lecture streaming service.
https://live.rbg.tum.de/
MIT License
177 stars 41 forks source link

IPraktikum 73 push notifications #1273

Closed carlobortolan closed 6 months ago

carlobortolan commented 6 months ago

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 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.

Changes related to push notifications:

Steps for Testing

See the documentation in our Postman collection and this push notification setup guide.