Result of matching activator.

@param MessageReceived $message

@return bool
430507
public function matches(MessageReceived $message): bool
    {
        $text = $message->getText();

        if ($text === null) {
            return false;
        }

        if (!$this->caseSensitive) {
            $text = Str::lower($text);
            $this->value = Str::lower($this->value);
        }

        return hash_equals($this->value, $text);
    }
943140
public function respond(Match $match, TemplateInterface $template, $message = '')
    {
        if ($match->isMatch()) {
            return;
        }

        $this->formatter->setMatch($match);
        $message = ($message) ? $message : $this->formatter->getMessage($template);
        throw new AssertionException($message);
    }
183278
public function isSignedMessageValid($address, $signature, $message)
    {
        $args = [
            (string)$address,
            (string)$signature,
            (string)$message
        ];
        return $this->rpc->query("verifyMessage", $args);
    }
551280
protected function preChecks($message, $senderID)
    {
        //TODO a better method for this
        //Pre-checks act1
        if ($senderID == null || !strlen(trim($senderID))) {
            $this->senderID = $this->config['default_sender'];
        } else {
            $this->senderID = $senderID;
        }

        //Pre-checks act2
        if ($message == null || !strlen(trim($message))) {
            $this->message = '&'; //Error character for sms
        } else {
            $this->message = $message;
        }
    }
732521
public function success($message)
    {
        $this->message = $message;
        $this->type = 'success';
        $this->title = 'Success';
        $this->icon = 'sl sl-icon-check success ln-notify-icon';

        return $this->setNotifier();
    }
75101
public function hasMessage(GmailMessageInterface $message): bool
    {
        if ($this->messages->contains($message)) {
            return true;
        }

        return false;
    }
604306
protected function getCreated(Message $message) {
    $value = NULL;
    if (isset($message)) {
      $value = $message->getCreatedTime();
    }
    return $value;
  }
1080415
public function hasExceptionOfMessage($message)
    {
        foreach ($this->_exceptions as $e) {
            if ($message == $e->getMessage()) {
                return true;
            }
        }

        return false;
    }
866803
protected function shouldHandleMessage(\CharlotteDunois\Yasmin\Models\Message $message, \CharlotteDunois\Yasmin\Models\Message $oldMessage = null) {
        if($message->author->bot || $message->author->id === $this->client->user->id) {
            return false;
        }
        
        if($message->guild !== null && !$message->guild->available) {
            return false;
        }
        
        // Ignore messages from users that the bot is already waiting for input from
        if(\array_key_exists($message->author->id.'-'.$message->channel->id, $this->awaiting)) {
            return false;
        }
        
        if($oldMessage !== null && $message->content === $oldMessage->content) {
            return false;
        }
        
        $editableDuration = (int) $this->client->getOption('commandEditableDuration');
        if($message->editedTimestamp !== null && ($editableDuration <= 0 || ($message->editedTimestamp - $message->createdTimestamp) >= $editableDuration)) {
            return false;
        }
        
        return true;
    }
204613
public function isClicked($message = null)
    {
        $cl = $this->js('click')->univ();
        if ($message !== null) {
            $cl->confirm($message);
        }

        $cl->ajaxec($this->app->url(null, array($this->name => 'clicked')), true);

        return isset($_GET[$this->name]);
    }
630872
protected function findResponse(IncomingMessage $message)
    {
        $actionId = $message->getActionId();
        if (isset($this->incomingQueue[$actionId])) {
            return $this->incomingQueue[$actionId];
        }
        return false;
    }
777417
public function executeChecker(Update $message)
    {
        if (is_callable($this->checker)) {
            return call_user_func($this->checker, $message);
        }

        return false;
    }
685661
public function postMessage($sender, $recipient, $message)
    {
        if ($this->maxMessages) {
            $statement = $this->connection->prepare(
                'SELECT COUNT(*) FROM "phergie-plugin-tell"
                    WHERE "recipient" = ?;'
            );
            $statement->execute([ $recipient ]);

            if ($statement->fetchColumn(0) >= $this->maxMessages) {
                return false;
            }
        }

        $this->connection->prepare(
            'INSERT INTO "phergie-plugin-tell"
                ("sender", "recipient", "message")
                VALUES (?, ?, ?);'
        )->execute([ $sender, $recipient, $message ]);

        return true;
    }
1110554
public function send(Message $message)
    {
        $mailer = $this->getMailer();
        $mailer->SetFrom($this->getFrom($message));
        $mailer->AddReplyTo($this->getFrom($message));
        $mailer->Subject = $message->getTitle();
        $mailer->AltBody = strip_tags(preg_replace("/<br.*>/i", "\n", $message->getBody()));
        $mailer->MsgHTML($message->getBody());
        $mailer->AddAddress($this->getUserMail($message->getTo()));

        $result = false;
        try {
            if ($mailer->Send()) {
                $message->setStatus(\oat\tao\model\messaging\Message::STATUS_SENT);
                $result = true;
            }
            if ($mailer->IsError()) {
                $message->setStatus(\oat\tao\model\messaging\Message::STATUS_ERROR);
            }
        } catch (phpmailerException $pe) {
            \common_Logger::e($pe->getMessage());
        }
        $mailer->ClearReplyTos();
        $mailer->ClearAllRecipients();
        $mailer->SmtpClose();

        return $result;
    }
1094313
public function validate(Message $message)
    {
        if ($message->getTitleLength() > self::CHARACTER_LIMIT) {
            $message->addStatus(new LimitTheTitleLengthTo69CharactersStatus());
        }
    }
730959
public static function isProtocolMessage(Message $message)
    {
        // Temporary check to maintain BC with legacy Messages.
        if (is_numeric($message->peek()) && $message->peek() < 100) {
            return true;
        }

        return false;
    }
713814
public function send(MessageInterface $message, &$failures = null)
    {
        if ($this->disableDelivery) {
            return true;
        }

        $data = [];
        $ld = $this->config->get('Decorators.Wrapper.0', '');
        $rd = $this->config->get('Decorators.Wrapper.1', '');
        foreach ($this->decorators as $email => $vars) {
            foreach ($vars as $name => $content) {
                $data[$ld . $name . $rd][] = $content;
            }
        }

        $msg = $message();
        /* @var $msg Email */
        $msg->setSubstitutions($data);

        $res = $this->mailer->send($message());

        if ($res->message == 'success') {
            return true;
        }

        return false;
    }