import org.asamk.signal.manager.api.UpdateProfile;
import org.asamk.signal.manager.api.UserStatus;
import org.asamk.signal.manager.api.UsernameLinkUrl;
+import org.asamk.signal.manager.api.UsernameStatus;
import org.freedesktop.dbus.DBusMap;
import org.freedesktop.dbus.DBusPath;
import org.freedesktop.dbus.connections.impl.DBusConnection;
return result;
}
+ @Override
+ public Map<String, UsernameStatus> getUsernameStatus(final Set<String> usernames) {
+ throw new UnsupportedOperationException();
+ }
+
@Override
public void updateAccountAttributes(
- final String deviceName, final Boolean unrestrictedUnidentifiedSender
+ final String deviceName,
+ final Boolean unrestrictedUnidentifiedSender,
+ final Boolean discoverableByNumber,
+ final Boolean numberSharing
) throws IOException {
if (deviceName != null) {
final var devicePath = signal.getThisDevice();
getRemoteObject(devicePath, Signal.Device.class).Set("org.asamk.Signal.Device", "Name", deviceName);
+ } else {
+ throw new UnsupportedOperationException();
}
}
return new SendMessageResults(0, Map.of());
}
+ @Override
+ public SendMessageResults sendMessageRequestResponse(
+ final MessageEnvelope.Sync.MessageRequestResponse.Type type,
+ final Set<RecipientIdentifier> recipientIdentifiers
+ ) {
+ throw new UnsupportedOperationException();
+ }
+
public void hideRecipient(final RecipientIdentifier.Single recipient) {
throw new UnsupportedOperationException();
}
return null;
}
return Recipient.newBuilder()
- .withAddress(new RecipientAddress(null, n))
+ .withAddress(new RecipientAddress(n))
.withContact(new Contact(contactName,
+ null,
+ null,
+ null,
null,
null,
null,
(String) group.get("Description").getValue(),
GroupInviteLinkUrl.fromUri((String) group.get("GroupInviteLink").getValue()),
((List<String>) group.get("Members").getValue()).stream()
- .map(m -> new RecipientAddress(null, m))
+ .map(m -> new RecipientAddress(m))
.collect(Collectors.toSet()),
((List<String>) group.get("PendingMembers").getValue()).stream()
- .map(m -> new RecipientAddress(null, m))
+ .map(m -> new RecipientAddress(m))
.collect(Collectors.toSet()),
((List<String>) group.get("RequestingMembers").getValue()).stream()
- .map(m -> new RecipientAddress(null, m))
+ .map(m -> new RecipientAddress(m))
.collect(Collectors.toSet()),
((List<String>) group.get("Admins").getValue()).stream()
- .map(m -> new RecipientAddress(null, m))
+ .map(m -> new RecipientAddress(m))
.collect(Collectors.toSet()),
((List<String>) group.get("Banned").getValue()).stream()
- .map(m -> new RecipientAddress(null, m))
+ .map(m -> new RecipientAddress(m))
.collect(Collectors.toSet()),
(boolean) group.get("IsBlocked").getValue(),
(int) group.get("MessageExpirationTimer").getValue(),
try {
this.dbusMsgHandler = messageReceived -> {
final var extras = messageReceived.getExtras();
- final var envelope = new MessageEnvelope(Optional.of(new RecipientAddress(null,
- messageReceived.getSender())),
+ final var envelope = new MessageEnvelope(Optional.of(new RecipientAddress(messageReceived.getSender())),
0,
messageReceived.getTimestamp(),
0,
connection.addSigHandler(Signal.MessageReceivedV2.class, signal, this.dbusMsgHandler);
this.dbusEditMsgHandler = messageReceived -> {
final var extras = messageReceived.getExtras();
- final var envelope = new MessageEnvelope(Optional.of(new RecipientAddress(null,
- messageReceived.getSender())),
+ final var envelope = new MessageEnvelope(Optional.of(new RecipientAddress(messageReceived.getSender())),
0,
messageReceived.getTimestamp(),
0,
case "delivery" -> MessageEnvelope.Receipt.Type.DELIVERY;
default -> MessageEnvelope.Receipt.Type.UNKNOWN;
};
- final var envelope = new MessageEnvelope(Optional.of(new RecipientAddress(null,
- receiptReceived.getSender())),
+ final var envelope = new MessageEnvelope(Optional.of(new RecipientAddress(receiptReceived.getSender())),
0,
receiptReceived.getTimestamp(),
0,
this.dbusSyncHandler = syncReceived -> {
final var extras = syncReceived.getExtras();
- final var envelope = new MessageEnvelope(Optional.of(new RecipientAddress(null,
- syncReceived.getSource())),
+ final var envelope = new MessageEnvelope(Optional.of(new RecipientAddress(syncReceived.getSource())),
0,
syncReceived.getTimestamp(),
0,
syncReceived.getTimestamp(),
syncReceived.getDestination().isEmpty()
? Optional.empty()
- : Optional.of(new RecipientAddress(null, syncReceived.getDestination())),
+ : Optional.of(new RecipientAddress(syncReceived.getDestination())),
Set.of(),
Optional.of(new MessageEnvelope.Data(syncReceived.getTimestamp(),
syncReceived.getGroupId().length > 0
final List<DBusMap<String, Variant<?>>> mentions = getValue(extras, "mentions");
return mentions.stream()
- .map(a -> new MessageEnvelope.Data.Mention(new RecipientAddress(null, getValue(a, "recipient")),
+ .map(a -> new MessageEnvelope.Data.Mention(new RecipientAddress(this.<String>getValue(a, "recipient")),
getValue(a, "start"),
getValue(a, "length")))
.toList();