mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-20 21:38:06 +01:00
Implement the ProfileBadgeConverter interface
This commit is contained in:
@@ -8,6 +8,7 @@ package org.whispersystems.textsecuregcm.entities;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import java.net.URL;
|
||||
import java.util.Objects;
|
||||
|
||||
public class Badge {
|
||||
private final URL imageUrl;
|
||||
@@ -35,4 +36,22 @@ public class Badge {
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(final Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
Badge badge = (Badge) o;
|
||||
return Objects.equals(imageUrl, badge.imageUrl) && Objects.equals(name,
|
||||
badge.name) && Objects.equals(description, badge.description);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(imageUrl, name, description);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user