global update and global fix
This commit is contained in:
@@ -4,6 +4,7 @@ import { JwtService } from '@nestjs/jwt';
|
||||
import { GetObjectCommand } from '@aws-sdk/client-s3';
|
||||
import { PrismaService } from '../infra/prisma.service';
|
||||
import { AccessService } from './access.service';
|
||||
import { ChatService } from './chat.service';
|
||||
import { MinioService } from '../infra/minio.service';
|
||||
|
||||
const AVATAR_ACCESS_TTL_SECONDS = 900;
|
||||
@@ -32,7 +33,8 @@ export class MediaService {
|
||||
private readonly minio: MinioService,
|
||||
private readonly jwt: JwtService,
|
||||
private readonly config: ConfigService,
|
||||
private readonly access: AccessService
|
||||
private readonly access: AccessService,
|
||||
private readonly chat: ChatService
|
||||
) {}
|
||||
|
||||
async createAvatarUploadUrl(userId: string, contentType: string) {
|
||||
@@ -259,6 +261,7 @@ export class MediaService {
|
||||
where: { id: roomId },
|
||||
data: { avatarStorageKey: storageKey, hasAvatar: true }
|
||||
});
|
||||
await this.chat.publishRoomAvatarChangedMessage(roomId, requesterId);
|
||||
return { roomId, hasAvatar: true };
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user