session-android/src/org/thoughtcrime/securesms/database/documents/NetworkFailure.java
Moxie Marlinspike 00d7b5c284 Better UX handling on identity key mismatches.
1) Migrate from GSON to Jackson everywhere.

2) Add support for storing identity key conflicts on message rows.

3) Add limited support for surfacing identity key conflicts in UI.
2015-02-27 12:26:09 -08:00

32 lines
681 B
Java

package org.thoughtcrime.securesms.database.documents;
import com.fasterxml.jackson.annotation.JsonProperty;
public class NetworkFailure {
@JsonProperty(value = "r")
private long recipientId;
public NetworkFailure(long recipientId) {
this.recipientId = recipientId;
}
public NetworkFailure() {}
public long getRecipientId() {
return recipientId;
}
@Override
public boolean equals(Object other) {
if (other == null || !(other instanceof NetworkFailure)) return false;
NetworkFailure that = (NetworkFailure)other;
return this.recipientId == that.recipientId;
}
@Override
public int hashCode() {
return (int)recipientId;
}
}