Commit 267cdc2
authored
Add Live Activity topics (#1773)
When a user is subscribed to a team, we will offer them a live activity
whenever that team is playing a match, as an alternative to push
notifications throughout the match. This live activity will be provided
via a single notification when the match starts, and users with app
versions that can support live activities will receive it by subscribing
to topics of type `FootballTeamLiveActivity`. Users with app versions
that do not support live activities will instead be subscribing to
topics of type `FootballTeam`, which will deliver notifications
throughout the match.
A user may visit a match info page before a live activity for that match
is available, as we only create it a couple of hours before the match
starts. We still want them to be able to subscribe and get that live
activity when it's ready, so we'll allow them to sign up to this
notification topic instead. The live activity will then be provided via
a single notification when the match starts. Users with app versions
that do not support live activities will instead be subscribing to
topics of type `FootballMatch`, which will deliver notifications
throughout the match.
This change adds two new `TopicType`s, `FootballTeamLiveActivity`
and `FootballMatchLiveActivity`, and includes them in the notification
payload for kick-off events only.1 parent 10aee02 commit 267cdc2
3 files changed
Lines changed: 38 additions & 3 deletions
File tree
- api-models/src/main/scala/com/gu/mobile.notifications.client/models
- football/src
- main/scala/com/gu/mobile/notifications/football/notificationbuilders
- test/scala/com/gu/mobile/notifications/football/lib
Lines changed: 23 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
23 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
24 | 47 | | |
25 | 48 | | |
26 | 49 | | |
| |||
Lines changed: 10 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
20 | 29 | | |
21 | 30 | | |
22 | 31 | | |
23 | 32 | | |
24 | | - | |
| 33 | + | |
25 | 34 | | |
26 | 35 | | |
27 | 36 | | |
| |||
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
51 | 54 | | |
52 | 55 | | |
53 | 56 | | |
| |||
0 commit comments