Skip to content

Commit

Permalink
cloud: update push library
Browse files Browse the repository at this point in the history
  • Loading branch information
koush committed Aug 9, 2024
1 parent 170bc5f commit 1bd7f37
Show file tree
Hide file tree
Showing 3 changed files with 145 additions and 87 deletions.
218 changes: 135 additions & 83 deletions plugins/cloud/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions plugins/cloud/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
]
},
"dependencies": {
"@eneris/push-receiver": "^3.1.5",
"@eneris/push-receiver": "^4.1.6",
"@scrypted/common": "file:../../common",
"@scrypted/sdk": "file:../../sdk",
"bpmux": "^8.2.1",
Expand All @@ -54,5 +54,5 @@
"@types/node": "^22.1.0",
"ts-node": "^10.9.2"
},
"version": "0.2.31"
"version": "0.2.32"
}
10 changes: 8 additions & 2 deletions plugins/cloud/src/push.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { EventEmitter } from 'events';
import PushReceiver, { Types } from '@eneris/push-receiver';
import { PushReceiver } from '@eneris/push-receiver';
import { Deferred } from '@scrypted/common/src/deferred';
import type { Types } from '@eneris/push-receiver/dist/client';

export declare interface PushManager {
on(event: 'message', listener: (data: any) => void): this;
Expand All @@ -27,7 +28,12 @@ export class PushManager extends EventEmitter {

const instance = new PushReceiver({
...savedConfig,
senderId,
firebase: {
messagingSenderId: senderId,
projectId: 'scrypted-app',
apiKey: 'AIzaSyDI0bgFuVPIqKZoNpB-iTOU7ijIeepxOXE',
appId: '1:827888101440:web:6ff9f8ada107e9cc0097a5',
} ,
heartbeatIntervalMs: 15 * 60 * 1000,
});

Expand Down

0 comments on commit 1bd7f37

Please sign in to comment.