Skip to content

Add Notifier SentMessage #13624

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions notifier/chatters.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,16 @@ you to send messages to chat services like Slack or Telegram::
// default transport (the first one configured)
->transport('slack');

$chatter->send($message);
$sentMessage = $chatter->send($message);

// ...
}
}

The ``$sentMessage`` (instance of
:class:`Symfony\\Component\\Notifier\\Message\\SentMessage`) returned by
``send()`` contains info about the sent message.

.. seealso::

Read :ref:`the main Notifier guide <notifier-chatter-dsn>` to see how
Expand All @@ -46,7 +50,7 @@ you to send messages to chat services like Slack or Telegram::
Adding Interactions to a Slack Message
--------------------------------------

With a Slack message, you can use the
With a Slack message, you can use the
:class:`Symfony\\Component\\Notifier\\Bridge\\Slack\\SlackOptions` to add
some interactive options called `Block elements`_::

Expand Down
8 changes: 6 additions & 2 deletions notifier/texters.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ you to send SMS messages::

// src/Controller/SecurityController.php
namespace App\Controller;

use Symfony\Component\Notifier\Message\SmsMessage;
use Symfony\Component\Notifier\TexterInterface;
use Symfony\Component\Routing\Annotation\Route;
Expand All @@ -33,12 +33,16 @@ you to send SMS messages::
'A new login was detected!'
);

$texter->send($sms);
$sentMessage = $texter->send($sms);

// ...
}
}

The ``$sentMessage`` (instance of
:class:`Symfony\\Component\\Notifier\\Message\\SentMessage`) returned by
``send()`` contains info about the sent message.

.. seealso::

Read :ref:`the main Notifier guide <notifier-texter-dsn>` to see how
Expand Down