Skip to content

Commit

Permalink
Merge pull request #3183 from chimp1984/add-mediator-type
Browse files Browse the repository at this point in the history
Change DisputeCommunicationMessage.Type enum
  • Loading branch information
sqrrm authored Sep 2, 2019
2 parents bcb7b1a + 3f885c2 commit ca0bccf
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
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

0 comments on commit ca0bccf

Please sign in to comment.