This commit is contained in:
leejh 2019-10-11 18:02:27 +09:00
parent b49a8313a9
commit 06ffd4e213

View File

@ -36,21 +36,25 @@ export class MessagesComponent implements OnInit {
} }
getUserName(seq: number): string { getUserName(seq: number): string {
if (!!this.userInfos) {
const userInfo: UserInfo[] = this.userInfos.filter( const userInfo: UserInfo[] = this.userInfos.filter(
user => user.seq === seq user => user.seq === seq
); );
if (!!userInfo && userInfo.length > 0) { if (!!userInfo && userInfo.length > 0) {
return userInfo[0].name; return userInfo[0].name;
} }
}
return '(알수없는 사용자)'; return '(알수없는 사용자)';
} }
getUserProfile(seq: number): string { getUserProfile(seq: number): string {
if (!!this.userInfos) {
const userInfo: UserInfo[] = this.userInfos.filter( const userInfo: UserInfo[] = this.userInfos.filter(
user => user.seq === seq user => user.seq === seq
); );
if (!!userInfo && userInfo.length > 0) { if (!!userInfo && userInfo.length > 0) {
return this.profileImageRoot + userInfo[0].profileImageFile; return this.profileImageRoot + userInfo[0].profileImageFile;
} }
}
return ''; return '';
} }
} }