Skip to content

Commit

Permalink
[signal] signal-cli 0.13
Browse files Browse the repository at this point in the history
  • Loading branch information
dalgwen committed Apr 26, 2024
1 parent 8ede55b commit e12a01c
Show file tree
Hide file tree
Showing 130 changed files with 4,981 additions and 1,397 deletions.
8 changes: 4 additions & 4 deletions bundles/org.openhab.binding.signal/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.openhab.addons.bundles</groupId>
<artifactId>org.openhab.addons.reactor.bundles</artifactId>
<version>4.1.0-SNAPSHOT</version>
<version>4.2.0-SNAPSHOT</version>
</parent>

<artifactId>org.openhab.binding.signal</artifactId>
Expand All @@ -24,13 +24,13 @@
<dependency>
<artifactId>signal-service-java</artifactId>
<groupId>com.github.turasa</groupId>
<version>2.15.3_unofficial_90</version>
<version>2.15.3_unofficial_96</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.github.turasa</groupId>
<artifactId>core-util-jvm</artifactId>
<version>2.15.3_unofficial_86</version>
<version>2.15.3_unofficial_96</version>
</dependency>
<dependency>
<groupId>com.squareup.wire</groupId>
Expand All @@ -41,7 +41,7 @@
<dependency>
<groupId>org.signal</groupId>
<artifactId>libsignal-client</artifactId>
<version>0.36.1</version>
<version>0.39.2</version>
<scope>compile</scope>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,15 @@
import org.asamk.signal.manager.api.SendGroupMessageResults;
import org.asamk.signal.manager.api.SendMessageResults;
import org.asamk.signal.manager.api.StickerPack;
import org.asamk.signal.manager.api.StickerPackId;
import org.asamk.signal.manager.api.StickerPackInvalidException;
import org.asamk.signal.manager.api.StickerPackUrl;
import org.asamk.signal.manager.api.TypingAction;
import org.asamk.signal.manager.api.UnregisteredRecipientException;
import org.asamk.signal.manager.api.UpdateGroup;
import org.asamk.signal.manager.api.UpdateProfile;
import org.asamk.signal.manager.api.UserStatus;
import org.asamk.signal.manager.api.UsernameLinkUrl;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.whispersystems.signalservice.api.util.PhoneNumberFormatter;
Expand Down Expand Up @@ -88,7 +90,12 @@ static boolean isSignalClientAvailable() {
*/
Map<String, UserStatus> getUserStatus(Set<String> numbers) throws IOException, RateLimitException;

void updateAccountAttributes(String deviceName) throws IOException;
void updateAccountAttributes(
String deviceName,
Boolean unrestrictedUnidentifiedSender,
final Boolean discoverableByNumber,
final Boolean numberSharing
) throws IOException;

Configuration getConfiguration();

Expand All @@ -100,11 +107,15 @@ static boolean isSignalClientAvailable() {
*/
void updateProfile(UpdateProfile updateProfile) throws IOException;

String getUsername();

UsernameLinkUrl getUsernameLink();

/**
* Set a username for the account.
* If the username is null, it will be deleted.
*/
String setUsername(String username) throws IOException, InvalidUsernameException;
void setUsername(String username) throws IOException, InvalidUsernameException;

/**
* Set a username for the account.
Expand Down Expand Up @@ -167,7 +178,7 @@ SendMessageResults sendViewedReceipt(
);

SendMessageResults sendMessage(
Message message, Set<RecipientIdentifier> recipients
Message message, Set<RecipientIdentifier> recipients, boolean notifySelf
) throws IOException, AttachmentInvalidException, NotAGroupMemberException, GroupNotFoundException, GroupSendingNotAllowedException, UnregisteredRecipientException, InvalidStickerException;

SendMessageResults sendEditMessage(
Expand All @@ -193,6 +204,12 @@ SendMessageResults sendPaymentNotificationMessage(

SendMessageResults sendEndSessionMessage(Set<RecipientIdentifier.Single> recipients) throws IOException;

SendMessageResults sendMessageRequestResponse(
MessageEnvelope.Sync.MessageRequestResponse.Type type, Set<RecipientIdentifier> recipientIdentifiers
);

void hideRecipient(RecipientIdentifier.Single recipient);

void deleteRecipient(RecipientIdentifier.Single recipient);

void deleteContact(RecipientIdentifier.Single recipient);
Expand Down Expand Up @@ -255,6 +272,8 @@ void receiveMessages(
Optional<Duration> timeout, Optional<Integer> maxMessages, ReceiveMessageHandler handler
) throws IOException, AlreadyReceivingException;

void stopReceiveMessages();

void setReceiveConfig(ReceiveConfig receiveConfig);

boolean isContactBlocked(RecipientIdentifier.Single recipient);
Expand Down Expand Up @@ -298,6 +317,14 @@ boolean trustIdentityVerified(

InputStream retrieveAttachment(final String id) throws IOException;

InputStream retrieveContactAvatar(final RecipientIdentifier.Single recipient) throws IOException, UnregisteredRecipientException;

InputStream retrieveProfileAvatar(final RecipientIdentifier.Single recipient) throws IOException, UnregisteredRecipientException;

InputStream retrieveGroupAvatar(final GroupId groupId) throws IOException;

InputStream retrieveSticker(final StickerPackId stickerPackId, final int stickerId) throws IOException;

@Override
void close();

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package org.asamk.signal.manager.actions;

import org.asamk.signal.manager.helper.Context;
import org.asamk.signal.manager.jobs.SyncStorageJob;

public class SyncStorageDataAction implements HandleAction {

private static final SyncStorageDataAction INSTANCE = new SyncStorageDataAction();

private SyncStorageDataAction() {
}

public static SyncStorageDataAction create() {
return INSTANCE;
}

@Override
public void execute(Context context) throws Throwable {
context.getJobExecutor().enqueueJob(new SyncStorageJob());
}
}
Loading

0 comments on commit e12a01c

Please sign in to comment.