You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by GitBox <gi...@apache.org> on 2021/11/02 04:59:16 UTC

[GitHub] [james-project] vttranlina commented on a change in pull request #716: JAMES-3539 PushSubscriptionSetCreateProcessor - pushVerification

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: notifications-unsubscribe@james.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org