mirror of
https://github.com/AsamK/signal-cli
synced 2025-09-04 05:00:39 +00:00
uploadStickerPath returns String
also, any zip file must be in the same directory as the manifest.json update documentation
This commit is contained in:
parent
d8e5ab5f20
commit
e193bafb8c
3 changed files with 6 additions and 5 deletions
|
@ -457,8 +457,9 @@ verifyWithPin(number<s>, verificationCode<s>, pin<s>) -> <>::
|
||||||
|
|
||||||
Exception: Failure, InvalidNumber
|
Exception: Failure, InvalidNumber
|
||||||
|
|
||||||
uploadStickerPack(stickerPackPath<s>) -> <>::
|
uploadStickerPack(stickerPackPath<s>) -> url<s>::
|
||||||
* stickerPackPath : Path to the sticker pack zip file or manifest.json file
|
* stickerPackPath : Path to the manifest.json file or a zip file in the same directory
|
||||||
|
* url : URL of sticker pack after successful upload
|
||||||
|
|
||||||
Exception: Failure
|
Exception: Failure
|
||||||
|
|
||||||
|
|
|
@ -245,7 +245,7 @@ public interface Signal extends DBusInterface {
|
||||||
|
|
||||||
void joinGroup(final String groupLink) throws Error.Failure;
|
void joinGroup(final String groupLink) throws Error.Failure;
|
||||||
|
|
||||||
void uploadStickerPack(String stickerPackPath) throws Error.Failure;
|
String uploadStickerPack(String stickerPackPath) throws Error.Failure;
|
||||||
|
|
||||||
class MessageReceived extends DBusSignal {
|
class MessageReceived extends DBusSignal {
|
||||||
|
|
||||||
|
|
|
@ -1595,11 +1595,11 @@ public class DbusSignalImpl implements Signal {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void uploadStickerPack(String stickerPackPath) {
|
public String uploadStickerPack(String stickerPackPath) {
|
||||||
File path = new File(stickerPackPath);
|
File path = new File(stickerPackPath);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
var url = m.uploadStickerPack(path);
|
return m.uploadStickerPack(path);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
throw new Error.Failure("Upload error (maybe image size is too large):" + e.getMessage());
|
throw new Error.Failure("Upload error (maybe image size is too large):" + e.getMessage());
|
||||||
} catch (StickerPackInvalidException e) {
|
} catch (StickerPackInvalidException e) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue