mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-24 16:57:50 +00:00
parent
9b82411c3d
commit
8713a85beb
@ -123,11 +123,13 @@ public class PushReceiver {
|
|||||||
IncomingPushMessage bundledMessage = message.withBody(preKeyExchange.getWhisperMessage().serialize());
|
IncomingPushMessage bundledMessage = message.withBody(preKeyExchange.getWhisperMessage().serialize());
|
||||||
handleReceivedSecureMessage(masterSecret, bundledMessage);
|
handleReceivedSecureMessage(masterSecret, bundledMessage);
|
||||||
} else {
|
} else {
|
||||||
String encoded = Base64.encodeBytes(message.getBody());
|
String encoded = Base64.encodeBytes(message.getBody());
|
||||||
IncomingTextMessage textMessage = new IncomingTextMessage(message, encoded, null);
|
IncomingTextMessage textMessage = new IncomingTextMessage(message, encoded, null);
|
||||||
IncomingPreKeyBundleMessage bundleMessage = new IncomingPreKeyBundleMessage(textMessage, encoded);
|
IncomingPreKeyBundleMessage bundleMessage = new IncomingPreKeyBundleMessage(textMessage, encoded);
|
||||||
|
EncryptingSmsDatabase database = DatabaseFactory.getEncryptingSmsDatabase(context);
|
||||||
|
Pair<Long, Long> messageAndThreadId = database.insertMessageInbox(masterSecret, bundleMessage);
|
||||||
|
|
||||||
DatabaseFactory.getEncryptingSmsDatabase(context).insertMessageInbox(masterSecret, bundleMessage);
|
MessageNotifier.updateNotification(context, masterSecret, messageAndThreadId.second);
|
||||||
}
|
}
|
||||||
} catch (InvalidKeyException e) {
|
} catch (InvalidKeyException e) {
|
||||||
Log.w("PushReceiver", e);
|
Log.w("PushReceiver", e);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user