import { AbuseState, PluginType } from '@shared/models'
import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes'
import { UserNotification, UserNotificationSetting, UserNotificationSettingValue, UserNotificationType } from '../../models/users'
-import { MockSmtpServer } from '../miscs/email'
+import { MockSmtpServer } from '../mock-servers/mock-email'
import { makeGetRequest, makePostBodyRequest, makePutBodyRequest } from '../requests/requests'
import { doubleFollow } from '../server/follows'
import { flushAndRunMultipleServers, ServerInfo } from '../server/servers'
-import { getUserNotificationSocket } from '../socket/socket-io'
import { setAccessTokensToServers, userLogin } from './login'
import { createUser, getMyUserInformation } from './users'
}
}
- const commentUrl = `http://localhost:${base.server.port}/videos/watch/${uuid};threadId=${threadId}`
+ const commentUrl = `http://localhost:${base.server.port}/w/${uuid};threadId=${threadId}`
function emailNotificationFinder (email: object) {
return email['text'].indexOf(commentUrl) !== -1
}
{
- const socket = getUserNotificationSocket(servers[0].url, userAccessToken)
+ const socket = servers[0].socketIOCommand.getUserNotificationSocket({ token: userAccessToken })
socket.on('new-notification', n => userNotifications.push(n))
}
{
- const socket = getUserNotificationSocket(servers[0].url, servers[0].accessToken)
+ const socket = servers[0].socketIOCommand.getUserNotificationSocket()
socket.on('new-notification', n => adminNotifications.push(n))
}
if (serversCount > 1) {
- const socket = getUserNotificationSocket(servers[1].url, servers[1].accessToken)
+ const socket = servers[1].socketIOCommand.getUserNotificationSocket()
socket.on('new-notification', n => adminNotificationsServer2.push(n))
}