Commit af51db40 authored by Nikolay Lobachev's avatar Nikolay Lobachev
Browse files

Issue #3377491 by LOBsTerr: Prevent showing pending invitations message on AJAX requests

parent d0999e5e
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -92,6 +92,11 @@ class GinviteSubscriber implements EventSubscriberInterface {
   *   The RequestEvent to process.
   */
  public function notifyAboutPendingInvitations(RequestEvent $event) {
    // Skip for AJAX requests.
    if ($event->getRequest()->isXmlHttpRequest()) {
      return;
    }

    if ($this->groupInvitationLoader->loadByUser()) {
      $config = $this->configFactory->get('ginvite.pending_invitations_warning');
      // Exclude routes where this info is redundant or will generate a