diff options
Diffstat (limited to 'shared/extra-utils/users')
-rw-r--r-- | shared/extra-utils/users/user-notifications.ts | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/shared/extra-utils/users/user-notifications.ts b/shared/extra-utils/users/user-notifications.ts index e75946eec..961cfcc0f 100644 --- a/shared/extra-utils/users/user-notifications.ts +++ b/shared/extra-utils/users/user-notifications.ts | |||
@@ -9,7 +9,6 @@ import { MockSmtpServer } from '../mock-servers/mock-email' | |||
9 | import { makeGetRequest, makePostBodyRequest, makePutBodyRequest } from '../requests/requests' | 9 | import { makeGetRequest, makePostBodyRequest, makePutBodyRequest } from '../requests/requests' |
10 | import { doubleFollow } from '../server/follows' | 10 | import { doubleFollow } from '../server/follows' |
11 | import { flushAndRunMultipleServers, ServerInfo } from '../server/servers' | 11 | import { flushAndRunMultipleServers, ServerInfo } from '../server/servers' |
12 | import { getUserNotificationSocket } from '../socket/socket-io' | ||
13 | import { setAccessTokensToServers, userLogin } from './login' | 12 | import { setAccessTokensToServers, userLogin } from './login' |
14 | import { createUser, getMyUserInformation } from './users' | 13 | import { createUser, getMyUserInformation } from './users' |
15 | 14 | ||
@@ -748,16 +747,16 @@ async function prepareNotificationsTest (serversCount = 3, overrideConfigArg: an | |||
748 | } | 747 | } |
749 | 748 | ||
750 | { | 749 | { |
751 | const socket = getUserNotificationSocket(servers[0].url, userAccessToken) | 750 | const socket = servers[0].socketIOCommand.getUserNotificationSocket({ token: userAccessToken }) |
752 | socket.on('new-notification', n => userNotifications.push(n)) | 751 | socket.on('new-notification', n => userNotifications.push(n)) |
753 | } | 752 | } |
754 | { | 753 | { |
755 | const socket = getUserNotificationSocket(servers[0].url, servers[0].accessToken) | 754 | const socket = servers[0].socketIOCommand.getUserNotificationSocket() |
756 | socket.on('new-notification', n => adminNotifications.push(n)) | 755 | socket.on('new-notification', n => adminNotifications.push(n)) |
757 | } | 756 | } |
758 | 757 | ||
759 | if (serversCount > 1) { | 758 | if (serversCount > 1) { |
760 | const socket = getUserNotificationSocket(servers[1].url, servers[1].accessToken) | 759 | const socket = servers[1].socketIOCommand.getUserNotificationSocket() |
761 | socket.on('new-notification', n => adminNotificationsServer2.push(n)) | 760 | socket.on('new-notification', n => adminNotificationsServer2.push(n)) |
762 | } | 761 | } |
763 | 762 | ||