diff options
author | Chocobozzz <me@florianbigard.com> | 2021-07-16 09:47:51 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-07-20 15:27:18 +0200 |
commit | 254d3579f5338f5fd775c17d15cdfc37078bcfb4 (patch) | |
tree | eaeb13fda16c16e98cd6991d202b0ca6a4cbdb63 /shared/extra-utils/users/notifications.ts | |
parent | 89d241a79c262b9775c233b73cff080043ebb5e6 (diff) | |
download | PeerTube-254d3579f5338f5fd775c17d15cdfc37078bcfb4.tar.gz PeerTube-254d3579f5338f5fd775c17d15cdfc37078bcfb4.tar.zst PeerTube-254d3579f5338f5fd775c17d15cdfc37078bcfb4.zip |
Use an object to represent a server
Diffstat (limited to 'shared/extra-utils/users/notifications.ts')
-rw-r--r-- | shared/extra-utils/users/notifications.ts | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/shared/extra-utils/users/notifications.ts b/shared/extra-utils/users/notifications.ts index 9196f0bf5..4c42fad3e 100644 --- a/shared/extra-utils/users/notifications.ts +++ b/shared/extra-utils/users/notifications.ts | |||
@@ -5,8 +5,9 @@ import { inspect } from 'util' | |||
5 | import { AbuseState, PluginType } from '@shared/models' | 5 | import { AbuseState, PluginType } from '@shared/models' |
6 | import { UserNotification, UserNotificationSetting, UserNotificationSettingValue, UserNotificationType } from '../../models/users' | 6 | import { UserNotification, UserNotificationSetting, UserNotificationSettingValue, UserNotificationType } from '../../models/users' |
7 | import { MockSmtpServer } from '../mock-servers/mock-email' | 7 | import { MockSmtpServer } from '../mock-servers/mock-email' |
8 | import { PeerTubeServer } from '../server' | ||
8 | import { doubleFollow } from '../server/follows' | 9 | import { doubleFollow } from '../server/follows' |
9 | import { flushAndRunMultipleServers, ServerInfo } from '../server/servers' | 10 | import { createMultipleServers } from '../server/servers' |
10 | import { setAccessTokensToServers } from './login' | 11 | import { setAccessTokensToServers } from './login' |
11 | 12 | ||
12 | function getAllNotificationsSettings (): UserNotificationSetting { | 13 | function getAllNotificationsSettings (): UserNotificationSetting { |
@@ -31,7 +32,7 @@ function getAllNotificationsSettings (): UserNotificationSetting { | |||
31 | } | 32 | } |
32 | 33 | ||
33 | type CheckerBaseParams = { | 34 | type CheckerBaseParams = { |
34 | server: ServerInfo | 35 | server: PeerTubeServer |
35 | emails: any[] | 36 | emails: any[] |
36 | socketNotifications: UserNotification[] | 37 | socketNotifications: UserNotification[] |
37 | token: string | 38 | token: string |
@@ -642,7 +643,7 @@ async function prepareNotificationsTest (serversCount = 3, overrideConfigArg: an | |||
642 | limit: 20 | 643 | limit: 20 |
643 | } | 644 | } |
644 | } | 645 | } |
645 | const servers = await flushAndRunMultipleServers(serversCount, Object.assign(overrideConfig, overrideConfigArg)) | 646 | const servers = await createMultipleServers(serversCount, Object.assign(overrideConfig, overrideConfigArg)) |
646 | 647 | ||
647 | await setAccessTokensToServers(servers) | 648 | await setAccessTokensToServers(servers) |
648 | 649 | ||