import org.asamk.signal.manager.groups.GroupSendingNotAllowedException;
import org.asamk.signal.manager.groups.LastGroupAdminException;
import org.asamk.signal.manager.groups.NotAGroupMemberException;
-import org.asamk.signal.manager.storage.recipients.Profile;
import org.whispersystems.signalservice.api.util.PhoneNumberFormatter;
import java.io.Closeable;
void setRegistrationLockPin(Optional<String> pin) throws IOException, NotPrimaryDeviceException;
- Profile getRecipientProfile(RecipientIdentifier.Single recipient) throws IOException, UnregisteredRecipientException;
-
List<Group> getGroups();
SendGroupMessageResults quitGroup(
/**
* Receive new messages from server, returns if no new message arrive in a timespan of timeout.
*/
- public void receiveMessages(
+ void receiveMessages(
Optional<Duration> timeout, Optional<Integer> maxMessages, ReceiveMessageHandler handler
) throws IOException, AlreadyReceivingException;
void setReceiveConfig(ReceiveConfig receiveConfig);
- boolean hasCaughtUpWithOldMessages();
-
boolean isContactBlocked(RecipientIdentifier.Single recipient);
void sendContacts() throws IOException;
context.getPreKeyHelper().refreshPreKeys();
}
- @Override
- public Profile getRecipientProfile(RecipientIdentifier.Single recipient) throws UnregisteredRecipientException {
- return context.getProfileHelper().getRecipientProfile(context.getRecipientHelper().resolveRecipient(recipient));
- }
-
@Override
public List<Group> getGroups() {
return account.getGroupStore().getGroups().stream().map(this::toGroup).toList();
context.getReceiveHelper().setReceiveConfig(receiveConfig);
}
- @Override
- public boolean hasCaughtUpWithOldMessages() {
- return context.getReceiveHelper().hasCaughtUpWithOldMessages();
- }
-
@Override
public boolean isContactBlocked(final RecipientIdentifier.Single recipient) {
final RecipientId recipientId;
this.needsToRetryFailedMessages = needsToRetryFailedMessages;
}
- public boolean hasCaughtUpWithOldMessages() {
- return hasCaughtUpWithOldMessages;
- }
-
public void setAuthenticationFailureListener(final Callable authenticationFailureListener) {
this.authenticationFailureListener = authenticationFailureListener;
}
import org.asamk.signal.manager.groups.LastGroupAdminException;
import org.asamk.signal.manager.groups.NotAGroupMemberException;
import org.asamk.signal.manager.storage.recipients.Contact;
-import org.asamk.signal.manager.storage.recipients.Profile;
import org.freedesktop.dbus.DBusMap;
import org.freedesktop.dbus.DBusPath;
import org.freedesktop.dbus.connections.impl.DBusConnection;
}
}
- @Override
- public Profile getRecipientProfile(final RecipientIdentifier.Single recipient) {
- throw new UnsupportedOperationException();
- }
-
@Override
public List<Group> getGroups() {
final var groups = signal.listGroups();
public void setReceiveConfig(final ReceiveConfig receiveConfig) {
}
- @Override
- public boolean hasCaughtUpWithOldMessages() {
- return true;
- }
-
@Override
public boolean isContactBlocked(final RecipientIdentifier.Single recipient) {
return signal.isContactBlocked(recipient.getIdentifier());