From f819b2f0a2daf74f824a34cfde8fb3f8bebd5752 Mon Sep 17 00:00:00 2001 From: richard-loafle <44828666+richard-loafle@users.noreply.github.com> Date: Mon, 17 Feb 2020 14:41:15 +0900 Subject: [PATCH] file check of message is modified --- .../src/lib/components/write.component.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/projects/ucap-webmessenger-ui-message/src/lib/components/write.component.ts b/projects/ucap-webmessenger-ui-message/src/lib/components/write.component.ts index 7755bd5d..6938aaea 100644 --- a/projects/ucap-webmessenger-ui-message/src/lib/components/write.component.ts +++ b/projects/ucap-webmessenger-ui-message/src/lib/components/write.component.ts @@ -296,7 +296,7 @@ export class WriteComponent implements OnInit, OnDestroy, AfterViewInit { const fakeMedia = await this.commonApiService.checkInvalidMediaMimeForFileTalk( files ); - if (!fakeMedia.accept) { + if (!!fakeMedia) { this.ngZone.run(() => { this.snackBarService.openFromComponent< AlertSnackbarComponent, @@ -309,10 +309,7 @@ export class WriteComponent implements OnInit, OnDestroy, AfterViewInit { html: this.translateService.instant( 'common.file.errors.notAcceptableMime', { - supporedType: - fakeMedia.rejected.length > 0 - ? fakeMedia.rejected.join(',') - : '' + supporedType: fakeMedia.join(',') } ) }