Skip to content

Commit

Permalink
Fix: 과릿 1.1.1 (#306)
Browse files Browse the repository at this point in the history
* Fix: 과릿 1.1.1 (#305)

* Fix: 학생 초대 문구 임시 수정 #304

* Fix: FCM 전송 시 이모지 제거 로직 미사용하도록 수정 #304
  • Loading branch information
dl-00-e8 authored Nov 10, 2023
1 parent 3ec89b9 commit a2edf38
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ public Message makeMessage(String token, String title, String body, String name,
return Message.builder()
.setToken(token)
.setNotification(Notification.builder()
.setTitle(removeEmojis(title))
.setBody(removeEmojis(body))
.setTitle(title)
.setBody(body)
.build())
.setAndroidConfig(AndroidConfig.builder()
.setPriority(AndroidConfig.Priority.HIGH)
Expand All @@ -105,8 +105,8 @@ public Message makeMessage(String token, String title, String body, String name,
return Message.builder()
.setToken(token)
.setNotification(Notification.builder()
.setTitle(removeEmojis(title))
.setBody(removeEmojis(body))
.setTitle(title)
.setBody(body)
.build())
.putData("name", name)
.putData("lectureId", (lectureId != null) ? lectureId.toString() : "")
Expand All @@ -123,8 +123,8 @@ public MulticastMessage makeMulticastMessage(List<String> tokenList, com.selfrun
if(notification.getName() == null) {
return MulticastMessage.builder()
.setNotification(Notification.builder()
.setTitle(removeEmojis(notification.getTitle()))
.setBody(removeEmojis(notification.getBody()))
.setTitle(notification.getTitle())
.setBody(notification.getBody())
.build())
.addAllTokens(tokenList)
.setAndroidConfig(AndroidConfig.builder()
Expand All @@ -134,8 +134,8 @@ public MulticastMessage makeMulticastMessage(List<String> tokenList, com.selfrun
}
return MulticastMessage.builder()
.setNotification(Notification.builder()
.setTitle(removeEmojis(notification.getTitle()))
.setBody(removeEmojis(notification.getBody()))
.setTitle(notification.getTitle())
.setBody(notification.getBody())
.build())
.putData("name", notification.getName())
.putData("lectureId", (notification.getLectureId() != null) ? notification.getLectureId().toString() : "")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,12 +156,13 @@ public Void sendInvitation(String name, String lectureName, PostInviteReq postIn

if(type.equals(Boolean.TRUE)) {
String regexOfEmojis = "[\uD83C-\uDBFF\uDC00-\uDFFF]+";
String content = "[과릿] " + name + " 선생님으로부터 " + lectureName + " 클래스 초대가 도착했습니다." + "\n" + "아래 링크를 통해 앱 설치 및 회원가입을 통해 수업에 참여해보세요!" + "\n" + "\n" + "안드로이드: " + "https://bit.ly/gwarit-android" + "\n" + "\n" + "애플: " + "https://bit.ly/gwarit-apple";
//String content = "[과릿] " + name + " 선생님으로부터 " + lectureName + " 클래스 초대가 도착했습니다." + "\n" + "아래 링크를 통해 앱 설치 및 회원가입을 통해 수업에 참여해보세요!" + "\n" + "\n" + "안드로이드: " + "https://bit.ly/gwarit-android" + "\n" + "\n" + "애플: " + "https://bit.ly/gwarit-apple";
String content = "[과릿] 선생님으로부터 클래스 초대가 도착했습니다." + "\n" + "아래 링크를 통해 앱 설치 및 회원가입을 통해 수업에 참여해보세요!" + "\n" + "\n" + "안드로이드: " + "https://bit.ly/gwarit-android" + "\n" + "\n" + "애플: " + "https://bit.ly/gwarit-apple";
smsMessageDtoList.add(new SmsMessageDto(postInviteReq.getPhone(), content.replaceAll(regexOfEmojis, "")));
}
if(type.equals(Boolean.FALSE)) {
String regexOfEmojis = "[\uD83C-\uDBFF\uDC00-\uDFFF]+";
String content = "[과릿] " + name + " 선생님으로부터 " + lectureName + " 클래스 초대가 도착했습니다." + "\n" + "아래 링크를 클릭 후 앱 열기를 통해 수업에 참여해보세요!" + "\n" + "\n" + "안드로이드: " + "https://bit.ly/gwarit-android" + "\n" + "\n" + "애플: " + "https://bit.ly/gwarit-apple";
String content = "[과릿] 선생님으로부터 클래스 초대가 도착했습니다." + "\n" + "아래 링크를 클릭 후 앱 열기를 통해 수업에 참여해보세요!" + "\n" + "\n" + "안드로이드: " + "https://bit.ly/gwarit-android" + "\n" + "\n" + "애플: " + "https://bit.ly/gwarit-apple";
smsMessageDtoList.add(new SmsMessageDto(postInviteReq.getPhone(), content.replaceAll(regexOfEmojis, "")));
}

Expand Down

0 comments on commit a2edf38

Please sign in to comment.