Add sticker pack url to list output

This commit is contained in:
AsamK 2022-01-03 18:50:27 +01:00
parent 99eef05084
commit 8a5f98dac6
10 changed files with 133 additions and 44 deletions

View file

@ -19,6 +19,7 @@ import org.asamk.signal.manager.api.RecipientIdentifier;
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.StickerPackUrl;
import org.asamk.signal.manager.api.TypingAction;
import org.asamk.signal.manager.api.UpdateGroup;
import org.asamk.signal.manager.groups.GroupId;
@ -436,10 +437,10 @@ public class DbusManagerImpl implements Manager {
}
@Override
public URI uploadStickerPack(final File path) throws IOException, StickerPackInvalidException {
public StickerPackUrl uploadStickerPack(final File path) throws IOException, StickerPackInvalidException {
try {
return new URI(signal.uploadStickerPack(path.getPath()));
} catch (URISyntaxException e) {
return StickerPackUrl.fromUri(new URI(signal.uploadStickerPack(path.getPath())));
} catch (URISyntaxException | StickerPackUrl.InvalidStickerPackLinkException e) {
throw new AssertionError(e);
}
}