diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/album-box.component.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/album-box.component.ts index 577b996d..51cce482 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/album-box.component.ts +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/album-box.component.ts @@ -211,7 +211,7 @@ export class AlbumBoxComponent implements OnInit, OnDestroy { this.commonApiService .fileTalkDownload({ userSeq: this.loginRes.userSeq, - deviceType: DeviceType.PC, + deviceType: this.environmentsInfo.deviceType, token: this.loginRes.tokenString, attachmentsSeq: fileInfo.info.seq, fileDownloadItem: fileInfo.fileDownloadItem diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/file-box.component.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/file-box.component.ts index 8210cb7f..38ded6e3 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/file-box.component.ts +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/file-box.component.ts @@ -33,7 +33,11 @@ import { CreateChatDialogResult, CreateChatDialogData } from '../../dialogs/chat/create-chat.dialog.component'; -import { UserSelectDialogType } from '@app/types'; +import { + UserSelectDialogType, + EnvironmentsInfo, + KEY_ENVIRONMENTS_INFO +} from '@app/types'; import { RoomInfo } from '@ucap-webmessenger/protocol-room'; export interface FileInfoTotal { @@ -60,6 +64,7 @@ export class FileBoxComponent implements OnInit, OnDestroy { selectedFileList: FileInfoTotal[] = []; loginRes: LoginResponse; + environmentsInfo: EnvironmentsInfo; currentTabIndex = 0; @@ -78,6 +83,9 @@ export class FileBoxComponent implements OnInit, OnDestroy { this.loginRes = this.sessionStorageService.get( KEY_LOGIN_RES_INFO ); + this.environmentsInfo = this.sessionStorageService.get( + KEY_ENVIRONMENTS_INFO + ); } ngOnInit() { @@ -247,7 +255,7 @@ export class FileBoxComponent implements OnInit, OnDestroy { this.commonApiService .fileTalkDownload({ userSeq: this.loginRes.userSeq, - deviceType: DeviceType.PC, + deviceType: this.environmentsInfo.deviceType, token: this.loginRes.tokenString, attachmentsSeq: fileInfo.info.seq, fileDownloadItem: fileInfo.fileDownloadItem diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/message/message-detail.dialog.component.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/message/message-detail.dialog.component.ts index 5dc46635..c5639525 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/message/message-detail.dialog.component.ts +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/message/message-detail.dialog.component.ts @@ -161,7 +161,7 @@ export class MessageDetailDialogComponent implements OnInit { this.messageApiService .retrieveResourceFile({ userSeq: this.data.loginRes.userSeq, - deviceType: DeviceType.PC, + deviceType: this.data.environmentsInfo.deviceType, tokenKey: this.data.loginRes.tokenString, type: this.messageInfo.type, msgId: this.messageInfo.msgId, @@ -187,7 +187,7 @@ export class MessageDetailDialogComponent implements OnInit { this.messageApiService .retrieveResourceFile({ userSeq: this.data.loginRes.userSeq, - deviceType: DeviceType.PC, + deviceType: this.data.environmentsInfo.deviceType, tokenKey: this.data.loginRes.tokenString, type: this.messageInfo.type, msgId: this.messageInfo.msgId, @@ -215,7 +215,7 @@ export class MessageDetailDialogComponent implements OnInit { // this.messageApiService // .retrieveResourceFile({ // userSeq: this.data.loginRes.userSeq, - // deviceType: DeviceType.PC, + // deviceType: this.data.environmentsInfo.deviceType, // tokenKey: this.data.loginRes.tokenString, // type: this.messageInfo.type, // msgId: this.messageInfo.msgId, @@ -310,7 +310,7 @@ export class MessageDetailDialogComponent implements OnInit { this.messageApiService .retrieveResourceFile({ userSeq: this.data.loginRes.userSeq, - deviceType: DeviceType.PC, + deviceType: this.data.environmentsInfo.deviceType, tokenKey: this.data.loginRes.tokenString, type: this.messageInfo.type, msgId: this.messageInfo.msgId, @@ -541,7 +541,7 @@ export class MessageDetailDialogComponent implements OnInit { this.messageApiService .cancelMessage({ userSeq: this.data.loginRes.userSeq, - deviceType: DeviceType.PC, + deviceType: this.data.environmentsInfo.deviceType, tokenKey: this.data.loginRes.tokenString, type: this.messageInfo.type, msgId: this.messageInfo.msgId,