Prevent showing pending invitations message on AJAX requests

Created on 27 July 2023, 11 months ago
Updated 28 July 2023, 11 months ago

When a user has pending invitations, the module sends a Drupal message on all requests.

This means that AJAX request also have the message (such as the preview in Views UI, or with the book module when selecting an option for the book outline).

I would suggest to add this to Drupal\ginvite\EventSubscriber\GinviteSubscriber::notifyAboutPendingInvitations()

  public function notifyAboutPendingInvitations(RequestEvent $event) {
    if ($event->getRequest()->isXmlHttpRequest()) {
      return;
    }
    // ...
πŸ“Œ Task
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡§πŸ‡ͺBelgium Ludo.R Brussels

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024