Skip to content

Commit

Permalink
fix: execute the ProtocolExecute's jobToRun zio (#8)
Browse files Browse the repository at this point in the history
Signed-off-by: Fabio Pinheiro <[email protected]>

Signed-off-by: Shailesh Patil <[email protected]>
  • Loading branch information
FabioPinheiro authored and mineme0110 committed May 1, 2024
1 parent 4499a03 commit e8eb809
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,9 @@ trait ProtocolExecuterWithServices[-R <: ProtocolExecuter.Services] extends Prot
case Some(value) => authEncrypt(reply)
case None => anonEncrypt(reply)
// TODO forward message
maybeSyncReplyMsg <- reply.to match // TODO improve
case None => ZIO.none
maybeSyncReplyMsg <- reply.to.map(_.toSeq) match // TODO improve
case None => ZIO.logWarning("Have a reply but the field 'to' is missing") *> ZIO.none
case Some(Seq()) => ZIO.logWarning("Have a reply but the field 'to' is empty") *> ZIO.none
case Some(send2DIDs) =>
ZIO
.foreach(send2DIDs)(to =>
Expand All @@ -83,7 +84,7 @@ trait ProtocolExecuterWithServices[-R <: ProtocolExecuter.Services] extends Prot
head.getServiceEndpointAsURIs.headOption // TODO head
case Seq() => None // TODO
}
jobToRun = mURL match
jobToRun <- mURL match
case None => ZIO.logWarning(s"No url to send message")
case Some(url) =>
ZIO.log(s"Send to url: $url") *>
Expand Down

0 comments on commit e8eb809

Please sign in to comment.