diff options
| author | Mar0xy <marie@kaifa.ch> | 2023-10-03 15:20:49 +0200 |
|---|---|---|
| committer | Mar0xy <marie@kaifa.ch> | 2023-10-03 15:20:49 +0200 |
| commit | 38e35e14726ba5540a52c894131b38ee41f80b91 (patch) | |
| tree | 3deb7aa93df80b4403308d0d07ad81574f5b2899 /packages/backend/src/server/api/StreamingApiServerService.ts | |
| parent | merge: increase comment length for files (#45) (diff) | |
| parent | fix: deck uiでuser listを見たときにリプライが表示されない (... (diff) | |
| download | sharkey-38e35e14726ba5540a52c894131b38ee41f80b91.tar.gz sharkey-38e35e14726ba5540a52c894131b38ee41f80b91.tar.bz2 sharkey-38e35e14726ba5540a52c894131b38ee41f80b91.zip | |
merge: upstream
Diffstat (limited to 'packages/backend/src/server/api/StreamingApiServerService.ts')
| -rw-r--r-- | packages/backend/src/server/api/StreamingApiServerService.ts | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/packages/backend/src/server/api/StreamingApiServerService.ts b/packages/backend/src/server/api/StreamingApiServerService.ts index 9acaa688c5..badcec1b33 100644 --- a/packages/backend/src/server/api/StreamingApiServerService.ts +++ b/packages/backend/src/server/api/StreamingApiServerService.ts @@ -14,6 +14,7 @@ import { NotificationService } from '@/core/NotificationService.js'; import { bindThis } from '@/decorators.js'; import { CacheService } from '@/core/CacheService.js'; import { MiLocalUser } from '@/models/User.js'; +import { UserService } from '@/core/UserService.js'; import { AuthenticateService, AuthenticationError } from './AuthenticateService.js'; import MainStreamConnection from './stream/Connection.js'; import { ChannelsService } from './stream/ChannelsService.js'; @@ -37,6 +38,7 @@ export class StreamingApiServerService { private authenticateService: AuthenticateService, private channelsService: ChannelsService, private notificationService: NotificationService, + private usersService: UserService, ) { } @@ -130,14 +132,10 @@ export class StreamingApiServerService { this.#connections.set(connection, Date.now()); const userUpdateIntervalId = user ? setInterval(() => { - this.usersRepository.update(user.id, { - lastActiveDate: new Date(), - }); + this.usersService.updateLastActiveDate(user); }, 1000 * 60 * 5) : null; if (user) { - this.usersRepository.update(user.id, { - lastActiveDate: new Date(), - }); + this.usersService.updateLastActiveDate(user); } connection.once('close', () => { |