title: How can I remove a message shown from a different module?
body: <p>In Drupal 7, I could use the following code.</p>
  <pre class="lang-php prettyprint-override"><code>if ($_SESSION['messages']['status'][0] == t('Registration successful. You are now logged in.')) {
    unset($_SESSION['messages']['status']);
  }
  </code></pre>
  <p>What is the equivalent code for Drupal 8?</p>