kopia lustrzana https://github.com/ryukoposting/Signal-Android
Fix issue where conversations started on linked devices didn't show a phone number.
rodzic
a51754e207
commit
9cd1971329
|
@ -1157,6 +1157,9 @@ public class SignalServiceMessageSender {
|
|||
|
||||
if (recipient.isPresent()) {
|
||||
sentMessage.setDestinationUuid(recipient.get().getServiceId().toString());
|
||||
if (recipient.get().getNumber().isPresent()) {
|
||||
sentMessage.setDestinationE164(recipient.get().getNumber().get());
|
||||
}
|
||||
}
|
||||
|
||||
if (dataMessage != null) {
|
||||
|
|
|
@ -674,7 +674,7 @@ public final class SignalServiceContent {
|
|||
Optional<SignalServiceDataMessage> dataMessage = sentContent.hasMessage() ? Optional.of(createSignalServiceMessage(metadata, sentContent.getMessage())) : Optional.empty();
|
||||
Optional<SignalServiceStoryMessage> storyMessage = sentContent.hasStoryMessage() ? Optional.of(createStoryMessage(sentContent.getStoryMessage())) : Optional.empty();
|
||||
Optional<SignalServiceAddress> address = SignalServiceAddress.isValidAddress(sentContent.getDestinationUuid())
|
||||
? Optional.of(new SignalServiceAddress(ServiceId.parseOrThrow(sentContent.getDestinationUuid())))
|
||||
? Optional.of(new SignalServiceAddress(ServiceId.parseOrThrow(sentContent.getDestinationUuid()), sentContent.getDestinationE164()))
|
||||
: Optional.empty();
|
||||
Set<SignalServiceStoryMessageRecipient> recipientManifest = sentContent.getStoryMessageRecipientsList()
|
||||
.stream()
|
||||
|
|
|
@ -34,7 +34,8 @@ public class SignalServiceAddress {
|
|||
this.e164 = e164;
|
||||
}
|
||||
|
||||
@SuppressWarnings("NewApi") public SignalServiceAddress(ServiceId serviceId) {
|
||||
@SuppressWarnings("NewApi")
|
||||
public SignalServiceAddress(ServiceId serviceId) {
|
||||
this.serviceId = Preconditions.checkNotNull(serviceId);
|
||||
this.e164 = Optional.empty();
|
||||
}
|
||||
|
|
|
@ -433,7 +433,7 @@ message SyncMessage {
|
|||
optional bool isAllowedToReply = 3;
|
||||
}
|
||||
|
||||
reserved /*destinationE164*/ 1;
|
||||
optional string destinationE164 = 1;
|
||||
optional string destinationUuid = 7;
|
||||
optional uint64 timestamp = 2;
|
||||
optional DataMessage message = 3;
|
||||
|
|
Ładowanie…
Reference in New Issue