Include device source and destination
This commit is contained in:
parent
8e763f62f5
commit
a0889130e5
|
@ -22,8 +22,9 @@ option java_outer_classname = "MessageProtos";
|
|||
message OutgoingMessageSignal {
|
||||
optional uint32 type = 1;
|
||||
optional string source = 2;
|
||||
optional uint32 sourceDevice = 7;
|
||||
optional string relay = 3;
|
||||
repeated string destinations = 4;
|
||||
// repeated string destinations = 4;
|
||||
optional uint64 timestamp = 5;
|
||||
optional bytes message = 6;
|
||||
}
|
|
@ -150,7 +150,8 @@ public class MessageController {
|
|||
|
||||
messageBuilder.setType(incomingMessage.getType())
|
||||
.setSource(source.getNumber())
|
||||
.setTimestamp(System.currentTimeMillis());
|
||||
.setTimestamp(System.currentTimeMillis())
|
||||
.setSourceDevice((int)source.getAuthenticatedDevice().get().getId());
|
||||
|
||||
if (messageBody.isPresent()) {
|
||||
messageBuilder.setMessage(ByteString.copyFrom(messageBody.get()));
|
||||
|
|
|
@ -28,6 +28,9 @@ public class IncomingMessage {
|
|||
@NotEmpty
|
||||
private String destination;
|
||||
|
||||
@JsonProperty
|
||||
private long destinationDeviceId = 1;
|
||||
|
||||
@JsonProperty
|
||||
@NotEmpty
|
||||
private String body;
|
||||
|
@ -38,9 +41,6 @@ public class IncomingMessage {
|
|||
@JsonProperty
|
||||
private long timestamp;
|
||||
|
||||
@JsonProperty
|
||||
private long destinationDeviceId = 1;
|
||||
|
||||
public String getDestination() {
|
||||
return destination;
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue