mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-30 02:50:39 +00:00
Group and contact avatars are now stored in the avatars subfolder of the settings path: - contact-NUMBER - group-GROUP_ID
40 lines
964 B
Java
40 lines
964 B
Java
package org.asamk.signal;
|
|
|
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
|
|
import java.util.Collection;
|
|
import java.util.HashSet;
|
|
import java.util.Set;
|
|
|
|
public class GroupInfo {
|
|
@JsonProperty
|
|
public final byte[] groupId;
|
|
|
|
@JsonProperty
|
|
public String name;
|
|
|
|
@JsonProperty
|
|
public Set<String> members = new HashSet<>();
|
|
|
|
private long avatarId;
|
|
|
|
@JsonIgnore
|
|
public long getAvatarId() {
|
|
return avatarId;
|
|
}
|
|
|
|
@JsonProperty
|
|
public boolean active;
|
|
|
|
public GroupInfo(byte[] groupId) {
|
|
this.groupId = groupId;
|
|
}
|
|
|
|
public GroupInfo(@JsonProperty("groupId") byte[] groupId, @JsonProperty("name") String name, @JsonProperty("members") Collection<String> members, @JsonProperty("avatarId") long avatarId) {
|
|
this.groupId = groupId;
|
|
this.name = name;
|
|
this.members.addAll(members);
|
|
this.avatarId = avatarId;
|
|
}
|
|
}
|