Fix placeholder messages showing in the wrong conversation.

This commit is contained in:
Mikunj 2019-11-18 10:03:59 +11:00
parent 4f1beeaa88
commit d0a828985a

View File

@ -1580,8 +1580,9 @@ public class PushDecryptJob extends BaseJob implements InjectableType {
} }
private Optional<InsertResult> insertPlaceholder(@NonNull String sender, int senderDevice, long timestamp) { private Optional<InsertResult> insertPlaceholder(@NonNull String sender, int senderDevice, long timestamp) {
Recipient primaryDevice = getPrimaryDeviceRecipient(sender);
SmsDatabase database = DatabaseFactory.getSmsDatabase(context); SmsDatabase database = DatabaseFactory.getSmsDatabase(context);
IncomingTextMessage textMessage = new IncomingTextMessage(Address.fromSerialized(sender), IncomingTextMessage textMessage = new IncomingTextMessage(primaryDevice.getAddress(),
senderDevice, timestamp, "", senderDevice, timestamp, "",
Optional.absent(), 0, false); Optional.absent(), 0, false);