mirror of
https://github.com/AsamK/signal-cli
synced 2025-09-06 22:10:38 +00:00
DBus methods
implement expanded updateGroup allow group commands to use Base64 strings as group identifiers * setGroupBlocked * getGroupName * getGroupMembers * sendGroupMessage * sendGroupMessageReaction * updateGroup update AvatarStore to make some methods public or static reuse UpdateGroupCommand code update DBus documentation
This commit is contained in:
parent
908deb43c5
commit
76406367ea
5 changed files with 466 additions and 59 deletions
|
@ -14,7 +14,7 @@ import java.nio.file.Files;
|
|||
|
||||
public class AvatarStore {
|
||||
|
||||
private final File avatarsPath;
|
||||
private static File avatarsPath = null;
|
||||
|
||||
public AvatarStore(final File avatarsPath) {
|
||||
this.avatarsPath = avatarsPath;
|
||||
|
@ -49,7 +49,7 @@ public class AvatarStore {
|
|||
deleteAvatar(getProfileAvatarFile(address));
|
||||
}
|
||||
|
||||
public void deleteGroupAvatar(GroupId groupId) throws IOException {
|
||||
public static void deleteGroupAvatar(GroupId groupId) throws IOException {
|
||||
deleteAvatar(getGroupAvatarFile(groupId));
|
||||
}
|
||||
|
||||
|
@ -67,13 +67,13 @@ public class AvatarStore {
|
|||
}
|
||||
}
|
||||
|
||||
private void deleteAvatar(final File avatarFile) throws IOException {
|
||||
private static void deleteAvatar(final File avatarFile) throws IOException {
|
||||
if (avatarFile.exists()) {
|
||||
Files.delete(avatarFile.toPath());
|
||||
}
|
||||
}
|
||||
|
||||
private File getGroupAvatarFile(GroupId groupId) {
|
||||
private static File getGroupAvatarFile(GroupId groupId) {
|
||||
return new File(avatarsPath, "group-" + groupId.toBase64().replace("/", "_"));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue