From 78a3abf12315826325c46c0b9e58cec1923f0abf Mon Sep 17 00:00:00 2001 From: Arvind Date: Wed, 13 Sep 2023 00:03:52 +0530 Subject: [PATCH 1/2] Fixing isSent missing in case of message reply --- .../service/NotificationListenerExampleService.java | 10 +++++++--- .../src/com/volla/launcher/worker/SignalWorker.java | 4 ++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/android/src/com/volla/launcher/service/NotificationListenerExampleService.java b/android/src/com/volla/launcher/service/NotificationListenerExampleService.java index 916fd8a8..0a5d1395 100644 --- a/android/src/com/volla/launcher/service/NotificationListenerExampleService.java +++ b/android/src/com/volla/launcher/service/NotificationListenerExampleService.java @@ -247,12 +247,16 @@ public void onNotificationPosted(StatusBarNotification sbn){ Log.d(TAG, "Keeping Volla notifications messages"); repository.insertMessage(msg); - users.uuid = String.valueOf(msg.getUuid()); + users.uuid = msg.getSelfDisplayName(); users.body = msg.getText(); - users.user_name = title; + users.user_name = String.valueOf(msg.getUuid()); users.user_contact_number = ""; users.read = false; - users.isSent = false; + if(msg.getSelfDisplayName() != null && msg.getSelfDisplayName().length()>=1){ + users.isSent = false; + } else { + users.isSent = true; + } users.notification = notificationStr; users.timeStamp = msg.getTimeStamp(); repository.insertUser(users); diff --git a/android/src/com/volla/launcher/worker/SignalWorker.java b/android/src/com/volla/launcher/worker/SignalWorker.java index eedd856d..ff631c6e 100644 --- a/android/src/com/volla/launcher/worker/SignalWorker.java +++ b/android/src/com/volla/launcher/worker/SignalWorker.java @@ -168,9 +168,9 @@ static void retriveMessageThreads(Map message, Activity activity){ for (Users m : it) { Map reply = new HashMap(); reply.put("id", m.getId()); - reply.put("thread_id", m.getUuid()); + reply.put("thread_id", m.getUser_name()); reply.put("body", m.getBody()); - reply.put("person", m.getUser_name()); + reply.put("person", m.getUuid()); reply.put("address", ""); reply.put("date", Long.toString(m.getTimeStamp())); reply.put("read", m.getRead()); From b199fe3998db1888e78fae5de74e5cfffb9bf7be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dr=2E=20J=C3=B6rg=20Wurzer?= Date: Sun, 17 Sep 2023 17:42:05 +0200 Subject: [PATCH 2/2] Fix for reply in Signal threads --- android/AndroidManifest.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/AndroidManifest.xml b/android/AndroidManifest.xml index 4549bc12..80356187 100644 --- a/android/AndroidManifest.xml +++ b/android/AndroidManifest.xml @@ -1,5 +1,5 @@ - +