mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-30 19:10:38 +00:00
Allow using data URIs for updateGroup/updateProfile avatars
Fixes #1082
This commit is contained in:
parent
dcaf1cc189
commit
5771bb858f
11 changed files with 60 additions and 73 deletions
|
@ -10,7 +10,6 @@ import org.asamk.signal.manager.Manager;
|
|||
import org.asamk.signal.manager.api.UpdateProfile;
|
||||
import org.asamk.signal.output.OutputWriter;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.Base64;
|
||||
|
||||
|
@ -50,7 +49,7 @@ public class UpdateProfileCommand implements JsonRpcLocalCommand {
|
|||
|
||||
var avatarPath = ns.getString("avatar");
|
||||
boolean removeAvatar = Boolean.TRUE.equals(ns.getBoolean("remove-avatar"));
|
||||
File avatarFile = removeAvatar || avatarPath == null ? null : new File(avatarPath);
|
||||
String avatarFile = removeAvatar || avatarPath == null ? null : avatarPath;
|
||||
|
||||
try {
|
||||
m.updateProfile(UpdateProfile.newBuilder()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue