Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change DisputeCommunicationMessage.Type enum #3183

Merged
merged 2 commits into from
Sep 2, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions common/src/main/proto/pb.proto
Original file line number Diff line number Diff line change
Expand Up @@ -283,8 +283,9 @@ message PeerOpenedDisputeMessage {

message DisputeCommunicationMessage {
enum Type {
DISPUTE = 0;
TRADE = 1;
MEDIATION = 0;
ARBITRATION = 1;
TRADE = 2;
}
int64 date = 1;
string trade_id = 2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public class DisputeChatSession extends ChatSession {

public DisputeChatSession(@Nullable Dispute dispute,
DisputeManager disputeManager) {
super(DisputeCommunicationMessage.Type.DISPUTE);
super(DisputeCommunicationMessage.Type.ARBITRATION);
this.dispute = dispute;
this.disputeManager = disputeManager;
}
Expand Down Expand Up @@ -136,7 +136,7 @@ public void dispatchMessage(DisputeMessage message) {
} else if (message instanceof PeerOpenedDisputeMessage) {
disputeManager.onPeerOpenedDisputeMessage((PeerOpenedDisputeMessage) message);
} else if (message instanceof DisputeCommunicationMessage) {
if (((DisputeCommunicationMessage) message).getType() != DisputeCommunicationMessage.Type.DISPUTE) {
if (((DisputeCommunicationMessage) message).getType() != DisputeCommunicationMessage.Type.ARBITRATION) {
log.debug("Ignore non dispute type communication message");
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@
public final class DisputeCommunicationMessage extends DisputeMessage {

public enum Type {
DISPUTE,
MEDIATION,
ARBITRATION,
TRADE;

public static DisputeCommunicationMessage.Type fromProto(
Expand Down