File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -56,6 +56,19 @@ export class Pusher {
5656 } ) ;
5757 }
5858
59+ static webpushPusher ( appId : string , pushkey : string , data : IPusherData ) : Pusher {
60+ return new Pusher ( {
61+ kind : "webpush" ,
62+ append : true , // as pushkeys are shared between multiple users on one origin
63+ data,
64+ pushkey,
65+ app_id : appId ,
66+ app_display_name : "Hydrogen" ,
67+ device_display_name : "Hydrogen" ,
68+ lang : "en"
69+ } ) ;
70+ }
71+
5972 static createDefaultPayload ( sessionId : string ) : { session_id : string } {
6073 return { session_id : sessionId } ;
6174 }
Original file line number Diff line number Diff line change @@ -37,8 +37,7 @@ export class NotificationService {
3737 events_only : true ,
3838 default_payload : defaultPayload
3939 } ;
40- return pusherFactory . httpPusher (
41- this . _pushConfig . gatewayUrl ,
40+ return pusherFactory . webpushPusher (
4241 this . _pushConfig . appId ,
4342 pushkey ,
4443 data
You can’t perform that action at this time.
0 commit comments