Skip to content

Commit

Permalink
Add return_route to Recipient's messages for mediatorcoordination2, m…
Browse files Browse the repository at this point in the history
…ediatorcoordination3, pickup3
  • Loading branch information
FabioPinheiro committed Aug 16, 2023
1 parent 2e008a2 commit 72e42fc
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ final case class KeylistUpdate(id: MsgID = MsgID(), from: FROM, to: TO, updates:
)
.toJSON_RFC7159
),
return_route = Some(ReturnRoute.all), // Protocol expect recipient to get reply on the same channel
)
def makeKeylistResponse(updated: Seq[(FROMTO, KeylistAction, KeylistResult)]) =
KeylistResponse(thid = id, to = from.asTO, from = to.asFROM, updated)
Expand Down Expand Up @@ -223,6 +224,7 @@ final case class KeylistQuery(
.Body(paginate = paginate)
.toJSON_RFC7159
),
return_route = Some(ReturnRoute.all), // Protocol expect recipient to get reply on the same channel
)
}
object KeylistQuery {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ final case class MediateRequest(id: MsgID = MsgID(), from: FROM, to: TO) {
`type` = piuri,
to = Some(Set(to)),
from = Some(from),
return_route = Some(ReturnRoute.all), // Protocol expect recipient to get reply on the same channel
)
def makeRespondMediateGrant =
MediateGrant(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ final case class MediateRequest(id: MsgID = MsgID(), from: FROM, to: TO) {
`type` = piuri,
to = Some(Set(to)),
from = Some(from),
return_route = Some(ReturnRoute.all), // Protocol expect recipient to get reply on the same channel
)
def makeRespondMediateGrant =
MediateGrant(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ final case class RecipientUpdate(id: MsgID = MsgID(), from: FROM, to: TO, update
)
.toJSON_RFC7159
),
return_route = Some(ReturnRoute.all), // Protocol expect recipient to get reply on the same channel
)
def makeRecipientResponse(updated: Seq[(FROMTO, RecipientAction, RecipientResult)]) =
RecipientResponse(thid = id, to = from.asTO, from = to.asFROM, updated)
Expand Down Expand Up @@ -223,6 +224,7 @@ final case class RecipientQuery(
.Body(paginate = paginate)
.toJSON_RFC7159
),
return_route = Some(ReturnRoute.all), // Protocol expect recipient to get reply on the same channel
)
}
object RecipientQuery {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ final case class LiveModeChange(id: MsgID = MsgID(), from: FROM, to: TO, live_de
id = id,
to = Some(Set(to)),
from = Some(from),
body = Some(LiveModeChange.Body(live_delivery = live_delivery).toJSON_RFC7159)
body = Some(LiveModeChange.Body(live_delivery = live_delivery).toJSON_RFC7159),
return_route = Some(ReturnRoute.all), // Protocol expect recipient to get reply on the same channel
)
}
object LiveModeChange {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ final case class MessageDelivery(
body = Some(MessageDelivery.Body(recipient_did = recipient_did).toJSON_RFC7159),
attachments = Some(
attachments.toSeq.map(e => Attachment(id = Some(e._1), data = AttachmentDataBase64(Base64.encode(e._2.toJson))))
)
),
return_route = Some(ReturnRoute.all), // Protocol expect recipient to get reply on the same channel
)
}
object MessageDelivery {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ final case class MessagesReceived(
thid = thid,
to = Some(Set(to)),
from = Some(from),
body = Some(MessagesReceived.Body(message_id_list = message_id_list).toJSON_RFC7159)
body = Some(MessagesReceived.Body(message_id_list = message_id_list).toJSON_RFC7159),
return_route = Some(ReturnRoute.all), // Protocol expect recipient to get reply on the same channel
)
}
object MessagesReceived {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ final case class StatusRequest(id: MsgID = MsgID(), from: FROM, to: TO, recipien
`type` = piuri,
to = Some(Set(to)),
from = Some(from),
return_route = Some(ReturnRoute.all), // Protocol expect recipient to get reply on the same channel
)
}
object StatusRequest {
Expand Down

0 comments on commit 72e42fc

Please sign in to comment.