diff options
author | kontrollanten <6680299+kontrollanten@users.noreply.github.com> | 2022-10-10 15:18:31 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-10 15:18:31 +0200 |
commit | c43ed8e8624383db5a0cf22b210cee202bae323c (patch) | |
tree | d2d2c3d06a0b15048bf1e1893b2bc8d07ed2214d /server/types | |
parent | 213bb3bb58b719679d533811b2e2c3852a3dd067 (diff) | |
download | PeerTube-c43ed8e8624383db5a0cf22b210cee202bae323c.tar.gz PeerTube-c43ed8e8624383db5a0cf22b210cee202bae323c.tar.zst PeerTube-c43ed8e8624383db5a0cf22b210cee202bae323c.zip |
Expose PeerTube socket to plugins (#5239)
* server(pluginHelpers): add socket
* test(plugins): add socket cases
* fixes after review
* Update plugin-helpers.ts
* Update plugin-helpers.ts
Diffstat (limited to 'server/types')
-rw-r--r-- | server/types/plugins/register-server-option.model.ts | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/server/types/plugins/register-server-option.model.ts b/server/types/plugins/register-server-option.model.ts index fb4f12a4c..a8b804b63 100644 --- a/server/types/plugins/register-server-option.model.ts +++ b/server/types/plugins/register-server-option.model.ts | |||
@@ -16,7 +16,7 @@ import { | |||
16 | ThumbnailType, | 16 | ThumbnailType, |
17 | VideoBlacklistCreate | 17 | VideoBlacklistCreate |
18 | } from '@shared/models' | 18 | } from '@shared/models' |
19 | import { MUserDefault, MVideoThumbnail } from '../models' | 19 | import { MUserDefault, MVideo, MVideoThumbnail, UserNotificationModelForApi } from '../models' |
20 | import { | 20 | import { |
21 | RegisterServerAuthExternalOptions, | 21 | RegisterServerAuthExternalOptions, |
22 | RegisterServerAuthExternalResult, | 22 | RegisterServerAuthExternalResult, |
@@ -86,6 +86,11 @@ export type PeerTubeHelpers = { | |||
86 | getServerActor: () => Promise<ActorModel> | 86 | getServerActor: () => Promise<ActorModel> |
87 | } | 87 | } |
88 | 88 | ||
89 | socket: { | ||
90 | sendNotification: (userId: number, notification: UserNotificationModelForApi) => void | ||
91 | sendVideoLiveNewState: (video: MVideo) => void | ||
92 | } | ||
93 | |||
89 | plugin: { | 94 | plugin: { |
90 | // PeerTube >= 3.2 | 95 | // PeerTube >= 3.2 |
91 | getBaseStaticRoute: () => string | 96 | getBaseStaticRoute: () => string |