File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
src/services/notifications Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -75,7 +75,19 @@ const newPreperation = async ({ procedureId }) => {
75
75
'notificationSettings.newPreperation' : true ,
76
76
} ) ;
77
77
const tokenObjects = users . reduce ( ( array , { pushTokens } ) => [ ...array , ...pushTokens ] , [ ] ) ;
78
- sendNotifications ( { tokenObjects, message : `Neue Gesetzesinitiative!\n${ procedure . title } ` } ) ;
78
+ let message ;
79
+ switch ( procedure . type ) {
80
+ case 'Gesetzgebung' :
81
+ message = `Neue Gesetzesinitiative!\n${ procedure . title } ` ;
82
+ break ;
83
+ case 'Antrag' :
84
+ message = `Neuer Antrag!\n${ procedure . title } ` ;
85
+ break ;
86
+ default :
87
+ message = `Neu!\n${ procedure . title } ` ;
88
+ break ;
89
+ }
90
+ sendNotifications ( { tokenObjects, message } ) ;
79
91
} ;
80
92
// newPreperation({ procedureId: 231079 });
81
93
You can’t perform that action at this time.
0 commit comments