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 }) => {
7575 'notificationSettings.newPreperation' : true ,
7676 } ) ;
7777 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 } ) ;
7991} ;
8092// newPreperation({ procedureId: 231079 });
8193
You can’t perform that action at this time.
0 commit comments