signal-cli/src/main/java/org/asamk/signal/GroupInfo.java
AsamK 3e2024ff0a Add avatar image storage
Group and contact avatars are now stored in the avatars subfolder
of the settings path:
- contact-NUMBER
- group-GROUP_ID
2016-06-19 20:58:01 +02:00

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;
}
}