29 lines
637 B
PHP
29 lines
637 B
PHP
<?php
|
|
|
|
namespace Slack\Listeners;
|
|
|
|
use Illuminate\Support\Facades\Log;
|
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
|
|
|
use Slack\Event\PinAdded;
|
|
|
|
class PinAddedListener implements ShouldQueue
|
|
{
|
|
protected const LOGKEY = 'LPA';
|
|
|
|
public $queue = 'high';
|
|
|
|
/**
|
|
* Handle the event.
|
|
*
|
|
* @param PinAdded $event
|
|
* @return void
|
|
*/
|
|
public function handle(PinAdded $event)
|
|
{
|
|
// Do some magic with event data
|
|
Log::info(sprintf('%s:Pin Added to message [%s] in [%s]',self::LOGKEY,$event->ts,$event->channel_id),['m'=>__METHOD__]);
|
|
|
|
Log::notice(sprintf('%s:Ignoring Pin Add on [%s]',static::LOGKEY,$event->ts),['m'=>__METHOD__]);
|
|
}
|
|
} |