Commit a82bebe
authored
chore(fcm): notification handling logic for sound field (#797)
* chore(fcm): notification handling logic for sound field
- Remove `IsGRPC` field from `PushNotification` struct
- Simplify condition by removing `IsGRPC` check in `GetAndroidNotification`
- Add checks for `APNS` and `Android` fields in `GetAndroidNotification`
- Remove `IsGRPC` initialization in `Send` method of `Server`
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
* refactor: refactor sound request handling and validation
- Change `req.Sound` type check from string to interface
- Add type assertion for `req.Sound` to string
- Ensure `req.APNS` and `req.Android` are only set if `req.Sound` is a string
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
---------
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>1 parent 0199ac4 commit a82bebe
3 files changed
+17
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
118 | | - | |
119 | 118 | | |
120 | 119 | | |
121 | 120 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
82 | 86 | | |
83 | | - | |
| 87 | + | |
84 | 88 | | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
89 | 96 | | |
90 | 97 | | |
91 | 98 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
83 | 82 | | |
84 | 83 | | |
85 | 84 | | |
| |||
0 commit comments