# 이슈처리 209
This commit is contained in:
parent
7c39285905
commit
8fdce621e9
|
@ -355,14 +355,14 @@
|
|||
</button>
|
||||
<button
|
||||
mat-menu-item
|
||||
*ngIf="isForwardableMessage(message, eventInfoStatusSubject.value)"
|
||||
*ngIf="isForwardableMessage(message, roomInfoSubject.value)"
|
||||
(click)="onClickMessageContextMenu('FORWARD', message)"
|
||||
>
|
||||
{{ 'chat.forwardEventTo' | translate }}
|
||||
</button>
|
||||
<button
|
||||
mat-menu-item
|
||||
*ngIf="isForwardableMessage(message, eventInfoStatusSubject.value)"
|
||||
*ngIf="isForwardableMessage(message, roomInfoSubject.value)"
|
||||
(click)="onClickMessageContextMenu('FORWARD_TO_ME', message)"
|
||||
>
|
||||
{{ 'chat.forwardEventToMe' | translate }}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import { EventType } from '../types/event.type';
|
||||
import { InfoResponse } from '../protocols/info';
|
||||
import { RoomInfo } from '@ucap-webmessenger/protocol-room';
|
||||
|
||||
export interface Info<T = {}> {
|
||||
// 이벤트SEQ
|
||||
|
@ -38,10 +39,7 @@ export function isRecallable(event: Info<any>, userSeq: number): boolean {
|
|||
);
|
||||
}
|
||||
|
||||
export function isForwardable(
|
||||
event: Info,
|
||||
eventInfoStatus: InfoResponse
|
||||
): boolean {
|
||||
export function isForwardable(event: Info, roomInfo: RoomInfo): boolean {
|
||||
if (
|
||||
event.type === EventType.Plan ||
|
||||
event.type === EventType.AllimTms ||
|
||||
|
@ -50,9 +48,9 @@ export function isForwardable(
|
|||
return false;
|
||||
} else if (event.type === EventType.File) {
|
||||
if (
|
||||
!!eventInfoStatus &&
|
||||
!!eventInfoStatus.validFileBaseSeq &&
|
||||
eventInfoStatus.validFileBaseSeq <= event.seq
|
||||
!!roomInfo &&
|
||||
!!roomInfo.expiredFileStdSeq &&
|
||||
roomInfo.expiredFileStdSeq <= event.seq
|
||||
) {
|
||||
// valid..
|
||||
return true;
|
||||
|
|
|
@ -117,7 +117,7 @@
|
|||
</ucap-chat-message-box-mass>
|
||||
<ucap-chat-message-box-file
|
||||
*ngSwitchCase="EventType.File"
|
||||
[eventInfoStatus]="eventInfoStatus"
|
||||
[roomInfo]="roomInfo"
|
||||
[message]="message"
|
||||
(save)="onSave($event)"
|
||||
(fileViewer)="onFileViewer($event)"
|
||||
|
|
|
@ -23,6 +23,7 @@ import {
|
|||
import { NGXLogger } from 'ngx-logger';
|
||||
import moment from 'moment';
|
||||
import { FileDownloadItem } from '@ucap-webmessenger/api';
|
||||
import { RoomInfo } from '@ucap-webmessenger/protocol-room';
|
||||
|
||||
@Component({
|
||||
selector: 'ucap-chat-message-box',
|
||||
|
@ -56,7 +57,7 @@ export class MessageBoxComponent implements OnInit, AfterViewInit {
|
|||
profileImage: string;
|
||||
|
||||
@Input()
|
||||
eventInfoStatus?: InfoResponse;
|
||||
roomInfo: RoomInfo;
|
||||
|
||||
@Input()
|
||||
translationSimpleview = false;
|
||||
|
|
|
@ -7,6 +7,7 @@ import {
|
|||
import { StatusCode, FileDownloadItem } from '@ucap-webmessenger/api';
|
||||
import { FileType } from '@ucap-webmessenger/protocol-file';
|
||||
import { NGXLogger } from 'ngx-logger';
|
||||
import { RoomInfo } from '@ucap-webmessenger/protocol-room';
|
||||
|
||||
@Component({
|
||||
selector: 'ucap-chat-message-box-file',
|
||||
|
@ -17,7 +18,7 @@ export class FileComponent implements OnInit {
|
|||
@Input()
|
||||
message: Info<FileEventJson>;
|
||||
@Input()
|
||||
eventInfoStatus: InfoResponse;
|
||||
roomInfo: RoomInfo;
|
||||
|
||||
@Output()
|
||||
save = new EventEmitter<{
|
||||
|
@ -48,8 +49,8 @@ export class FileComponent implements OnInit {
|
|||
|
||||
getExpiredFile() {
|
||||
if (
|
||||
!!this.eventInfoStatus &&
|
||||
this.eventInfoStatus.validFileBaseSeq <= this.message.seq
|
||||
!!this.roomInfo &&
|
||||
this.roomInfo.expiredFileStdSeq <= this.message.seq
|
||||
) {
|
||||
return false;
|
||||
} else {
|
||||
|
|
|
@ -66,7 +66,7 @@
|
|||
[senderName]="getUserName(message.senderSeq)"
|
||||
[profileImageRoot]="profileImageRoot"
|
||||
[profileImage]="getUserProfile(message.senderSeq)"
|
||||
[eventInfoStatus]="eventInfoStatus"
|
||||
[roomInfo]="roomInfo"
|
||||
[translationSimpleview]="translationSimpleview"
|
||||
[unreadCount]="isShowUnreadCount ? getUnreadCount(message) : undefined"
|
||||
(openProfile)="onClickOpenProfile($event)"
|
||||
|
|
Loading…
Reference in New Issue
Block a user