Skip to content

Commit

Permalink
Merge pull request #413 from boostcampwm2023/BE-ChangePushName-#412
Browse files Browse the repository at this point in the history
[BE/#412] 푸시 알림에서 전송자 이름으로 변경
  • Loading branch information
namewhat99 authored Dec 9, 2023
2 parents f8c2c55 + b389d9b commit 530b847
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion BE/src/chat/chat.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,12 @@ export class ChatService {
chatRoom.writerUser.user_hash === message.sender
? chatRoom.userUser
: chatRoom.writerUser;
const sender: UserEntity =
chatRoom.writerUser.user_hash !== message.sender
? chatRoom.userUser
: chatRoom.writerUser;
const pushMessage: PushMessage = this.fcmHandler.createChatPushMessage(
receiver.nickname,
sender.nickname,
message.message,
message.room_id,
);
Expand Down

0 comments on commit 530b847

Please sign in to comment.