vttranlina commented on a change in pull request #716:
URL: https://github.com/apache/james-project/pull/716#discussion_r740720314



##########
File path: 
server/protocols/jmap-rfc-8621/src/main/scala/org/apache/james/jmap/method/PushSubscriptionSetCreatePerformer.scala
##########
@@ -87,3 +95,20 @@ class PushSubscriptionSetCreatePerformer 
@Inject()(pushSubscriptionRepository: P
       case (path, _) => 
SetError.invalidArguments(SetErrorDescription(s"Unknown error on property 
'$path'"))
     }
 }
+
+object PushSubscriptionSetCreateProcessor {

Review comment:
       I don't like this name, I used it because the issue wrote that 
(https://github.com/linagora/james-project/issues/4411)
   Should we rename it to "PushVerificationProcessor" ? or move it directly 
inside the `PushSubscriptionSetCreatePerformer` class.

##########
File path: 
server/protocols/jmap-rfc-8621/src/main/scala/org/apache/james/jmap/method/PushSubscriptionSetCreatePerformer.scala
##########
@@ -70,6 +75,9 @@ class PushSubscriptionSetCreatePerformer 
@Inject()(pushSubscriptionRepository: P
 
   private def create(clientId: PushSubscriptionCreationId, request: 
PushSubscriptionCreationRequest, mailboxSession: MailboxSession): 
SMono[CreationResult] =
     
SMono.fromPublisher(pushSubscriptionRepository.save(mailboxSession.getUser, 
request))
+      .flatMap(subscription => 
verificationCreateProcessor.pushVerificationToPushServer(subscription.url,

Review comment:
       Should we handler the `pushVerificationToPushServer` error case? Then we 
will remove the entry saved before?
   




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to