conn.sendSignal(new Signal.ReceiptReceived(
objectPath,
envelope.getTimestamp(),
- envelope.getSource()
+ !envelope.isUnidentifiedSender() && envelope.hasSource() ? envelope.getSourceE164().get() : content.getSender().getNumber().get()
));
} catch (DBusException e) {
e.printStackTrace();
SignalServiceDataMessage message = content.getDataMessage().get();
if (!message.isEndSession() &&
- !(message.getGroupInfo().isPresent() &&
- message.getGroupInfo().get().getType() != SignalServiceGroup.Type.DELIVER)) {
+ !(message.getGroupContext().isPresent() &&
+ message.getGroupContext().get().getGroupV1Type() != SignalServiceGroup.Type.DELIVER)) {
List<String> attachments = new ArrayList<>();
if (message.getAttachments().isPresent()) {
for (SignalServiceAttachment attachment : message.getAttachments().get()) {
conn.sendSignal(new Signal.MessageReceived(
objectPath,
message.getTimestamp(),
- envelope.getSource(),
- message.getGroupInfo().isPresent() ? message.getGroupInfo().get().getGroupId() : new byte[0],
+ envelope.isUnidentifiedSender() || !envelope.hasSource() ? content.getSender().getNumber().get() : envelope.getSourceE164().get(),
+ message.getGroupContext().isPresent() && message.getGroupContext().get().getGroupV1().isPresent()
+ ? message.getGroupContext().get().getGroupV1().get().getGroupId() : new byte[0],
message.getBody().isPresent() ? message.getBody().get() : "",
attachments));
} catch (DBusException e) {