Skip to content

Commit

Permalink
Clean up chatroom befor passing it to chat controller(fixes #74)
Browse files Browse the repository at this point in the history
  • Loading branch information
0xf104a committed Jan 5, 2024
1 parent cbde68e commit 41f86f5
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ private NotificationBuilderResult setMessagingChatStyle(NotificationController c
NotificationBuilderResult builderResult,
@NonNull JSONObject rawNotification) throws Exception {
Person person = getPersonFromNotification(controller, rawNotification);
final String room = rawNotification.getString("link");
final String room = cleanUpChatroom(rawNotification.getString("link"));
final String title = rawNotification.getJSONObject("subjectRichParameters")
.getJSONObject("call").getString("name");
final String text = rawNotification.getString("message");
Expand Down Expand Up @@ -211,7 +211,7 @@ public NotificationBuilderResult updateNotification(int id, NotificationBuilderR
if (rawNotification.has("object_type")) {
if (rawNotification.getString("object_type").equals("chat")) {
Log.d(TAG, "Talk notification of chat type, adding fast reply button");
String replyLabel = "Reply"; //FIXME: get text from resources
String replyLabel = context.getString(R.string.talk_fast_reply);
RemoteInput remoteInput = new RemoteInput.Builder(KEY_TEXT_REPLY)
.setLabel(replyLabel)
.build();
Expand Down

0 comments on commit 41f86f5

Please sign in to comment.