Code styling update, no functional changes
This commit is contained in:
parent
e5f803d122
commit
4691a3f775
@ -5,6 +5,7 @@ namespace Slack;
|
|||||||
use Illuminate\Support\Arr;
|
use Illuminate\Support\Arr;
|
||||||
use Illuminate\Support\Facades\App;
|
use Illuminate\Support\Facades\App;
|
||||||
use Illuminate\Support\Facades\Log;
|
use Illuminate\Support\Facades\Log;
|
||||||
|
|
||||||
use Slack\Blockkit\Modal;
|
use Slack\Blockkit\Modal;
|
||||||
use Slack\Response\Chat;
|
use Slack\Response\Chat;
|
||||||
use Slack\Exceptions\{SlackAlreadyPinnedException,
|
use Slack\Exceptions\{SlackAlreadyPinnedException,
|
||||||
|
@ -2,14 +2,13 @@
|
|||||||
|
|
||||||
namespace Slack;
|
namespace Slack;
|
||||||
|
|
||||||
use Illuminate\Http\Request;
|
|
||||||
use Illuminate\Support\Facades\Log;
|
use Illuminate\Support\Facades\Log;
|
||||||
use Slack\Models\{Channel,Enterprise,Team,User};
|
|
||||||
|
|
||||||
use App\Models\Slack\Channel as AppChannel;
|
use App\Models\Slack\Channel as AppChannel;
|
||||||
use App\Models\Slack\Enterprise as AppEnterprise;
|
use App\Models\Slack\Enterprise as AppEnterprise;
|
||||||
use App\Models\Slack\Team as AppTeam;
|
use App\Models\Slack\Team as AppTeam;
|
||||||
use App\Models\Slack\User as AppUser;
|
use App\Models\Slack\User as AppUser;
|
||||||
|
use Slack\Models\{Channel,Enterprise,Team,User};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class Base - is a Base to all incoming Slack POST requests
|
* Class Base - is a Base to all incoming Slack POST requests
|
||||||
@ -94,7 +93,6 @@ abstract class Base
|
|||||||
}
|
}
|
||||||
|
|
||||||
return $o->exists ? $o : NULL;
|
return $o->exists ? $o : NULL;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -5,8 +5,8 @@ namespace Slack\Blockkit\Blocks\Accessories;
|
|||||||
use \Exception;
|
use \Exception;
|
||||||
use Illuminate\Support\Arr;
|
use Illuminate\Support\Arr;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
use Illuminate\Support\Facades\Log;
|
|
||||||
use Slack\Blockkit\Blocks\Elements\Text;
|
use Slack\Blockkit\Blocks\Elements\{Confirm,Text};
|
||||||
use Slack\Blockkit\Element;
|
use Slack\Blockkit\Element;
|
||||||
|
|
||||||
final class Overflow extends Element
|
final class Overflow extends Element
|
||||||
@ -19,7 +19,6 @@ final class Overflow extends Element
|
|||||||
private const MAX_OPTIONS = 5;
|
private const MAX_OPTIONS = 5;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Text $placeholder
|
|
||||||
* @param string $action_id
|
* @param string $action_id
|
||||||
* @param Collection $options
|
* @param Collection $options
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
|
@ -4,9 +4,9 @@ namespace Slack\Blockkit\Blocks;
|
|||||||
|
|
||||||
use \Exception;
|
use \Exception;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
|
|
||||||
use Slack\Blockkit\Blocks;
|
use Slack\Blockkit\Blocks;
|
||||||
use Slack\Blockkit\Blocks\Elements\{Button,MultiStaticSelect,Text};
|
use Slack\Blockkit\Blocks\Elements\{Button,MultiStaticSelect};
|
||||||
use Slack\Blockkit\Element;
|
|
||||||
|
|
||||||
final class Actions extends Blocks
|
final class Actions extends Blocks
|
||||||
{
|
{
|
||||||
@ -22,10 +22,6 @@ final class Actions extends Blocks
|
|||||||
Blocks\Accessories\Overflow::class,
|
Blocks\Accessories\Overflow::class,
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
|
||||||
* @param Text $text
|
|
||||||
* @throws Exception
|
|
||||||
*/
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
|
@ -4,6 +4,7 @@ namespace Slack\Blockkit\Blocks;
|
|||||||
|
|
||||||
use \Exception;
|
use \Exception;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
|
|
||||||
use Slack\Blockkit\Blocks;
|
use Slack\Blockkit\Blocks;
|
||||||
|
|
||||||
final class Context extends Blocks
|
final class Context extends Blocks
|
||||||
|
@ -2,9 +2,7 @@
|
|||||||
|
|
||||||
namespace Slack\Blockkit\Blocks;
|
namespace Slack\Blockkit\Blocks;
|
||||||
|
|
||||||
use \Exception;
|
|
||||||
use Slack\Blockkit\Blocks;
|
use Slack\Blockkit\Blocks;
|
||||||
use Slack\Blockkit\Blocks\Elements\Text;
|
|
||||||
|
|
||||||
final class Divider extends Blocks
|
final class Divider extends Blocks
|
||||||
{
|
{
|
||||||
@ -12,10 +10,6 @@ final class Divider extends Blocks
|
|||||||
'block_id' => 255, // @todo Should be unique for each message
|
'block_id' => 255, // @todo Should be unique for each message
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
|
||||||
* @param Text|NULL $text
|
|
||||||
* @throws Exception
|
|
||||||
*/
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
namespace Slack\Blockkit\Blocks\Elements;
|
namespace Slack\Blockkit\Blocks\Elements;
|
||||||
|
|
||||||
use \Exception;
|
use \Exception;
|
||||||
|
|
||||||
use Slack\Blockkit\Element;
|
use Slack\Blockkit\Element;
|
||||||
|
|
||||||
final class Button extends Element
|
final class Button extends Element
|
||||||
|
@ -2,13 +2,14 @@
|
|||||||
|
|
||||||
namespace Slack\Blockkit\Blocks\Elements;
|
namespace Slack\Blockkit\Blocks\Elements;
|
||||||
|
|
||||||
use \Exception;
|
|
||||||
use Slack\Blockkit\Element;
|
use Slack\Blockkit\Element;
|
||||||
|
|
||||||
final class Confirm extends Element
|
final class Confirm extends Element
|
||||||
{
|
{
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
|
parent::__construct();
|
||||||
|
|
||||||
abort(500,'Not Implememted');
|
abort(500,'Not Implememted');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
namespace Slack\Blockkit\Blocks\Elements;
|
namespace Slack\Blockkit\Blocks\Elements;
|
||||||
|
|
||||||
use \Exception;
|
use \Exception;
|
||||||
|
|
||||||
use Slack\Blockkit\Element;
|
use Slack\Blockkit\Element;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
namespace Slack\Blockkit\Blocks\Elements;
|
namespace Slack\Blockkit\Blocks\Elements;
|
||||||
|
|
||||||
use \Exception;
|
use \Exception;
|
||||||
|
|
||||||
use Slack\Blockkit\Element;
|
use Slack\Blockkit\Element;
|
||||||
|
|
||||||
final class Text extends Element
|
final class Text extends Element
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
namespace Slack\Blockkit\Blocks;
|
namespace Slack\Blockkit\Blocks;
|
||||||
|
|
||||||
use \Exception;
|
use \Exception;
|
||||||
|
|
||||||
use Slack\Blockkit\Blocks;
|
use Slack\Blockkit\Blocks;
|
||||||
use Slack\Blockkit\Blocks\Elements\Text;
|
use Slack\Blockkit\Blocks\Elements\Text;
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
namespace Slack\Blockkit\Blocks;
|
namespace Slack\Blockkit\Blocks;
|
||||||
|
|
||||||
use \Exception;
|
use \Exception;
|
||||||
use Illuminate\Support\Collection;
|
|
||||||
use Slack\Blockkit\{Blocks,Element};
|
use Slack\Blockkit\{Blocks,Element};
|
||||||
|
|
||||||
final class Input extends Blocks
|
final class Input extends Blocks
|
||||||
@ -22,7 +22,7 @@ final class Input extends Blocks
|
|||||||
// @todo dispatch_action
|
// @todo dispatch_action
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Text|NULL $text not required if fields is provided
|
* @param Elements\Text|null $label
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function __construct(Elements\Text $label=NULL)
|
public function __construct(Elements\Text $label=NULL)
|
||||||
|
@ -4,6 +4,7 @@ namespace Slack\Blockkit\Blocks;
|
|||||||
|
|
||||||
use \Exception;
|
use \Exception;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
|
|
||||||
use Slack\Blockkit\{Blocks,Element};
|
use Slack\Blockkit\{Blocks,Element};
|
||||||
use Slack\BLockKit\Blocks\Elements\Text;
|
use Slack\BLockKit\Blocks\Elements\Text;
|
||||||
|
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
namespace Slack\Blockkit;
|
namespace Slack\Blockkit;
|
||||||
|
|
||||||
use \Exception;
|
use \Exception;
|
||||||
|
|
||||||
use Slack\BlockKit;
|
use Slack\BlockKit;
|
||||||
use Slack\Blockkit\Blocks\Divider;
|
use Slack\Blockkit\Blocks\Divider;
|
||||||
use Slack\Blockkit\Blocks\Elements\Text;
|
use Slack\Blockkit\Blocks\Elements\Text;
|
||||||
|
@ -2,9 +2,8 @@
|
|||||||
|
|
||||||
namespace Slack\Channels;
|
namespace Slack\Channels;
|
||||||
|
|
||||||
use Illuminate\Notifications\Notification;
|
use Illuminate\Support\Facades\Notification;
|
||||||
use Illuminate\Support\Facades\Log;
|
use Illuminate\Support\Facades\Log;
|
||||||
use Illuminate\Support\Facades\Schema;
|
|
||||||
|
|
||||||
class SlackBotChannel
|
class SlackBotChannel
|
||||||
{
|
{
|
||||||
|
@ -3,8 +3,8 @@
|
|||||||
namespace Slack\Command;
|
namespace Slack\Command;
|
||||||
|
|
||||||
use Illuminate\Support\Facades\Log;
|
use Illuminate\Support\Facades\Log;
|
||||||
|
|
||||||
use Slack\Base as SlackBase;
|
use Slack\Base as SlackBase;
|
||||||
use Slack\Blockkit\Blocks;
|
|
||||||
use Slack\Message;
|
use Slack\Message;
|
||||||
|
|
||||||
abstract class Base extends SlackBase
|
abstract class Base extends SlackBase
|
||||||
|
@ -5,6 +5,7 @@ namespace Slack\Command;
|
|||||||
use Illuminate\Support\Arr;
|
use Illuminate\Support\Arr;
|
||||||
use Illuminate\Support\Facades\App;
|
use Illuminate\Support\Facades\App;
|
||||||
use Illuminate\Support\Facades\Log;
|
use Illuminate\Support\Facades\Log;
|
||||||
|
|
||||||
use Slack\Client\Payload;
|
use Slack\Client\Payload;
|
||||||
|
|
||||||
class Factory {
|
class Factory {
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
namespace Slack\Command;
|
namespace Slack\Command;
|
||||||
|
|
||||||
use Illuminate\Http\Request;
|
|
||||||
use Illuminate\Support\Facades\Log;
|
use Illuminate\Support\Facades\Log;
|
||||||
|
|
||||||
use Slack\Message;
|
use Slack\Message;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -5,6 +5,7 @@ namespace Slack\Console\Commands;
|
|||||||
use Illuminate\Console\Command;
|
use Illuminate\Console\Command;
|
||||||
use Illuminate\Support\Facades\Log;
|
use Illuminate\Support\Facades\Log;
|
||||||
use React\EventLoop\Loop;
|
use React\EventLoop\Loop;
|
||||||
|
|
||||||
use Slack\Client\SocketMode;
|
use Slack\Client\SocketMode;
|
||||||
use Slack\Command\Factory as SlackCommandFactory;
|
use Slack\Command\Factory as SlackCommandFactory;
|
||||||
use Slack\Event\Factory as SlackEventFactory;
|
use Slack\Event\Factory as SlackEventFactory;
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
namespace Slack\Event;
|
namespace Slack\Event;
|
||||||
|
|
||||||
use Illuminate\Http\Request;
|
|
||||||
use Illuminate\Support\Facades\Log;
|
use Illuminate\Support\Facades\Log;
|
||||||
|
|
||||||
use Slack\Base as SlackBase;
|
use Slack\Base as SlackBase;
|
||||||
|
|
||||||
abstract class Base extends SlackBase
|
abstract class Base extends SlackBase
|
||||||
|
@ -2,10 +2,10 @@
|
|||||||
|
|
||||||
namespace Slack\Event;
|
namespace Slack\Event;
|
||||||
|
|
||||||
use Illuminate\Http\Request;
|
|
||||||
use Illuminate\Support\Arr;
|
use Illuminate\Support\Arr;
|
||||||
use Illuminate\Support\Facades\App;
|
use Illuminate\Support\Facades\App;
|
||||||
use Illuminate\Support\Facades\Log;
|
use Illuminate\Support\Facades\Log;
|
||||||
|
|
||||||
use Slack\Client\Payload;
|
use Slack\Client\Payload;
|
||||||
|
|
||||||
class Factory {
|
class Factory {
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
namespace Slack\Event;
|
namespace Slack\Event;
|
||||||
|
|
||||||
use Illuminate\Http\Request;
|
|
||||||
use Illuminate\Support\Facades\Log;
|
use Illuminate\Support\Facades\Log;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -4,10 +4,10 @@ namespace Slack\Http\Controllers;
|
|||||||
|
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Support\Facades\Log;
|
use Illuminate\Support\Facades\Log;
|
||||||
use Slack\Client\Payload;
|
|
||||||
use Slack\Event\Factory as SlackEventFactory;
|
|
||||||
|
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
|
use Slack\Client\Payload;
|
||||||
|
use Slack\Event\Factory as SlackEventFactory;
|
||||||
|
|
||||||
class EventsController extends Controller
|
class EventsController extends Controller
|
||||||
{
|
{
|
||||||
|
@ -4,12 +4,12 @@ namespace Slack\Http\Controllers;
|
|||||||
|
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Support\Facades\Log;
|
use Illuminate\Support\Facades\Log;
|
||||||
|
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
use Slack\Client\Payload;
|
use Slack\Client\Payload;
|
||||||
use Slack\Message;
|
use Slack\Message;
|
||||||
use Slack\Interactive\Factory as InteractiveMessageFactory;
|
use Slack\Interactive\Factory as InteractiveMessageFactory;
|
||||||
|
|
||||||
use App\Http\Controllers\Controller;
|
|
||||||
|
|
||||||
class InteractiveMessageController extends Controller
|
class InteractiveMessageController extends Controller
|
||||||
{
|
{
|
||||||
private const LOGKEY = 'CIM';
|
private const LOGKEY = 'CIM';
|
||||||
|
@ -4,10 +4,10 @@ namespace Slack\Http\Controllers;
|
|||||||
|
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Support\Facades\Log;
|
use Illuminate\Support\Facades\Log;
|
||||||
use Slack\Client\Payload;
|
|
||||||
use Slack\Options\Factory as SlackOptionsFactory;
|
|
||||||
|
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
|
use Slack\Client\Payload;
|
||||||
|
use Slack\Options\Factory as SlackOptionsFactory;
|
||||||
|
|
||||||
class InteractiveOptionsController extends Controller
|
class InteractiveOptionsController extends Controller
|
||||||
{
|
{
|
||||||
@ -18,6 +18,7 @@ class InteractiveOptionsController extends Controller
|
|||||||
*
|
*
|
||||||
* @param Request $request
|
* @param Request $request
|
||||||
* @return \Illuminate\Http\Response|\Laravel\Lumen\Http\ResponseFactory
|
* @return \Illuminate\Http\Response|\Laravel\Lumen\Http\ResponseFactory
|
||||||
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public function fire(Request $request)
|
public function fire(Request $request)
|
||||||
{
|
{
|
||||||
|
@ -11,7 +11,6 @@ use Slack\Jobs\TeamUpdate;
|
|||||||
use Slack\Models\{Enterprise,Team,Token,User};
|
use Slack\Models\{Enterprise,Team,Token,User};
|
||||||
|
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
use App\Models\Slack\Channel as AppChannel;
|
|
||||||
use App\Models\Slack\Enterprise as AppEnterprise;
|
use App\Models\Slack\Enterprise as AppEnterprise;
|
||||||
use App\Models\Slack\Team as AppTeam;
|
use App\Models\Slack\Team as AppTeam;
|
||||||
use App\Models\Slack\User as AppUser;
|
use App\Models\Slack\User as AppUser;
|
||||||
|
@ -7,7 +7,6 @@ use Illuminate\Http\Request;
|
|||||||
use Illuminate\Support\Facades\Log;
|
use Illuminate\Support\Facades\Log;
|
||||||
|
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
|
|
||||||
use Slack\Client\Payload;
|
use Slack\Client\Payload;
|
||||||
use Slack\Command\Factory;
|
use Slack\Command\Factory;
|
||||||
use Slack\Message;
|
use Slack\Message;
|
||||||
|
@ -5,6 +5,7 @@ namespace Slack\Http\Middleware;
|
|||||||
use Closure;
|
use Closure;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Support\Facades\Log;
|
use Illuminate\Support\Facades\Log;
|
||||||
|
|
||||||
use Slack\Client\Payload;
|
use Slack\Client\Payload;
|
||||||
use Slack\Event\Factory as EventFactory;
|
use Slack\Event\Factory as EventFactory;
|
||||||
use Slack\Interactive\Factory as InteractiveFactory;
|
use Slack\Interactive\Factory as InteractiveFactory;
|
||||||
|
@ -6,6 +6,7 @@ use Carbon\Carbon;
|
|||||||
use Closure;
|
use Closure;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Support\Facades\Log;
|
use Illuminate\Support\Facades\Log;
|
||||||
|
|
||||||
use Slack\Base;
|
use Slack\Base;
|
||||||
|
|
||||||
class CheckSignature
|
class CheckSignature
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
namespace Slack\Interactive;
|
namespace Slack\Interactive;
|
||||||
|
|
||||||
use Illuminate\Support\Facades\Log;
|
use Illuminate\Support\Facades\Log;
|
||||||
|
|
||||||
use Slack\Base as SlackBase;
|
use Slack\Base as SlackBase;
|
||||||
|
|
||||||
abstract class Base extends SlackBase
|
abstract class Base extends SlackBase
|
||||||
|
@ -4,6 +4,7 @@ namespace Slack\Interactive;
|
|||||||
|
|
||||||
use Illuminate\Support\Arr;
|
use Illuminate\Support\Arr;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
|
|
||||||
use Slack\Models\Channel;
|
use Slack\Models\Channel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -4,6 +4,7 @@ namespace Slack\Interactive;
|
|||||||
|
|
||||||
use Illuminate\Support\Arr;
|
use Illuminate\Support\Arr;
|
||||||
use Illuminate\Support\Facades\Log;
|
use Illuminate\Support\Facades\Log;
|
||||||
|
|
||||||
use Slack\Message;
|
use Slack\Message;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
namespace Slack\Interactive;
|
namespace Slack\Interactive;
|
||||||
|
|
||||||
use Illuminate\Http\Request;
|
|
||||||
use Illuminate\Support\Facades\Log;
|
use Illuminate\Support\Facades\Log;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -5,9 +5,9 @@ namespace Slack\Interactive;
|
|||||||
use Illuminate\Support\Arr;
|
use Illuminate\Support\Arr;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
use Illuminate\Support\Facades\Log;
|
use Illuminate\Support\Facades\Log;
|
||||||
use Slack\Message;
|
|
||||||
use Slack\Models\Team;
|
|
||||||
use Slack\Blockkit\Modal;
|
use Slack\Blockkit\Modal;
|
||||||
|
use Slack\Models\Team;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Incoming modal view submission event.
|
* Incoming modal view submission event.
|
||||||
@ -41,7 +41,8 @@ class ViewSubmission extends Base
|
|||||||
/**
|
/**
|
||||||
* This method should be overridden by a local implementation
|
* This method should be overridden by a local implementation
|
||||||
*
|
*
|
||||||
* @return Message
|
* @return Modal
|
||||||
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public function respond(): Modal
|
public function respond(): Modal
|
||||||
{
|
{
|
||||||
|
@ -4,6 +4,7 @@ namespace Slack\Jobs;
|
|||||||
|
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
use Illuminate\Support\Facades\Log;
|
use Illuminate\Support\Facades\Log;
|
||||||
|
|
||||||
use Slack\Models\{Channel,User};
|
use Slack\Models\{Channel,User};
|
||||||
use Slack\Exceptions\SlackException;
|
use Slack\Exceptions\SlackException;
|
||||||
|
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
namespace Slack\Jobs;
|
namespace Slack\Jobs;
|
||||||
|
|
||||||
use Illuminate\Support\Facades\Log;
|
use Illuminate\Support\Facades\Log;
|
||||||
|
|
||||||
use Slack\Exceptions\SlackTokenScopeException;
|
use Slack\Exceptions\SlackTokenScopeException;
|
||||||
use Slack\Models\Team;
|
use Slack\Models\Team;
|
||||||
|
|
||||||
|
@ -4,9 +4,9 @@ namespace Slack\Listeners;
|
|||||||
|
|
||||||
use Illuminate\Support\Facades\Log;
|
use Illuminate\Support\Facades\Log;
|
||||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||||
use Slack\Event\AppHomeOpened;
|
|
||||||
|
|
||||||
use App\Jobs\SlackHomeTabUpdate;
|
use App\Jobs\SlackHomeTabUpdate;
|
||||||
|
use Slack\Event\AppHomeOpened;
|
||||||
|
|
||||||
class AppHomeOpenedListener implements ShouldQueue
|
class AppHomeOpenedListener implements ShouldQueue
|
||||||
{
|
{
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
namespace Slack\Listeners;
|
namespace Slack\Listeners;
|
||||||
|
|
||||||
use Illuminate\Support\Facades\Log;
|
use Illuminate\Support\Facades\Log;
|
||||||
|
|
||||||
use Slack\Jobs\DeleteChat;
|
use Slack\Jobs\DeleteChat;
|
||||||
use Slack\Interactive\BlockActions;
|
use Slack\Interactive\BlockActions;
|
||||||
|
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace App\Listeners;
|
namespace Slack\Listeners;
|
||||||
|
|
||||||
use Illuminate\Support\Facades\Log;
|
use Illuminate\Support\Facades\Log;
|
||||||
|
|
||||||
use Slack\Blockkit\Blocks\Elements\Text;
|
use Slack\Blockkit\Blocks\Elements\Text;
|
||||||
use Slack\Blockkit\Blocks\{Header,Section};
|
use Slack\Blockkit\Blocks\{Header,Section};
|
||||||
use Slack\Blockkit\Modal;
|
use Slack\Blockkit\Modal;
|
||||||
@ -20,10 +21,11 @@ class ShortcutListener //implements ShouldQueue
|
|||||||
* Handle the event.
|
* Handle the event.
|
||||||
*
|
*
|
||||||
* @param Shortcut $event
|
* @param Shortcut $event
|
||||||
* @return void
|
* @return Message|null
|
||||||
|
* @throws \Exception
|
||||||
* @todo To Test
|
* @todo To Test
|
||||||
*/
|
*/
|
||||||
public function handle(Shortcut $event): Message
|
public function handle(Shortcut $event): ?Message
|
||||||
{
|
{
|
||||||
if (! $event->channel() || ! $event->channel()->active) {
|
if (! $event->channel() || ! $event->channel()->active) {
|
||||||
$modal = new Modal(Text::item(config('app.name'),'plain_text'));
|
$modal = new Modal(Text::item(config('app.name'),'plain_text'));
|
||||||
|
@ -8,6 +8,7 @@ use Illuminate\Database\Eloquent\Model;
|
|||||||
use Illuminate\Support\Arr;
|
use Illuminate\Support\Arr;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
use Illuminate\Support\Facades\Log;
|
use Illuminate\Support\Facades\Log;
|
||||||
|
|
||||||
use Slack\Blockkit\Blocks;
|
use Slack\Blockkit\Blocks;
|
||||||
use Slack\Blockkit\Blocks\Context;
|
use Slack\Blockkit\Blocks\Context;
|
||||||
use Slack\Blockkit\Blocks\Elements\Text;
|
use Slack\Blockkit\Blocks\Elements\Text;
|
||||||
|
@ -4,6 +4,7 @@ namespace Slack\Message;
|
|||||||
|
|
||||||
use \Exception;
|
use \Exception;
|
||||||
use Illuminate\Support\Arr;
|
use Illuminate\Support\Arr;
|
||||||
|
|
||||||
use Slack\BlockKit;
|
use Slack\BlockKit;
|
||||||
use Slack\Blockkit\Blocks;
|
use Slack\Blockkit\Blocks;
|
||||||
|
|
||||||
@ -13,15 +14,6 @@ final class Attachment extends BlockKit
|
|||||||
'footer' => 300,
|
'footer' => 300,
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
|
||||||
* @param Text $text
|
|
||||||
* @throws Exception
|
|
||||||
*/
|
|
||||||
public function __construct()
|
|
||||||
{
|
|
||||||
parent::__construct();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function item(): self
|
public static function item(): self
|
||||||
{
|
{
|
||||||
return new self();
|
return new self();
|
||||||
|
@ -2,10 +2,10 @@
|
|||||||
|
|
||||||
namespace Slack\Models;
|
namespace Slack\Models;
|
||||||
|
|
||||||
use App\Models\Slack\Team as AppTeam;
|
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
use Illuminate\Support\Arr;
|
use Illuminate\Support\Arr;
|
||||||
|
|
||||||
|
use App\Models\Slack\Team as AppTeam;
|
||||||
use Slack\Traits\ScopeActive;
|
use Slack\Traits\ScopeActive;
|
||||||
|
|
||||||
class Channel extends Model
|
class Channel extends Model
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
namespace Slack\Models;
|
namespace Slack\Models;
|
||||||
|
|
||||||
use App\Models\Slack\Team as AppTeam;
|
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
use App\Models\Slack\Team as AppTeam;
|
||||||
use Slack\Traits\ScopeActive;
|
use Slack\Traits\ScopeActive;
|
||||||
|
|
||||||
class Enterprise extends Model
|
class Enterprise extends Model
|
||||||
|
@ -2,11 +2,11 @@
|
|||||||
|
|
||||||
namespace Slack\Models;
|
namespace Slack\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
use App\Models\Slack\Channel as AppChannel;
|
use App\Models\Slack\Channel as AppChannel;
|
||||||
use App\Models\Slack\Token as AppToken;
|
use App\Models\Slack\Token as AppToken;
|
||||||
use App\Models\Slack\User as AppUser;
|
use App\Models\Slack\User as AppUser;
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Model;
|
|
||||||
use Slack\API;
|
use Slack\API;
|
||||||
use Slack\Traits\ScopeActive;
|
use Slack\Traits\ScopeActive;
|
||||||
|
|
||||||
|
@ -2,10 +2,10 @@
|
|||||||
|
|
||||||
namespace Slack\Models;
|
namespace Slack\Models;
|
||||||
|
|
||||||
use App\Models\Slack\Team as AppTeam;
|
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
|
|
||||||
|
use App\Models\Slack\Team as AppTeam;
|
||||||
use Slack\Traits\ScopeActive;
|
use Slack\Traits\ScopeActive;
|
||||||
|
|
||||||
class Token extends Model
|
class Token extends Model
|
||||||
|
@ -2,12 +2,12 @@
|
|||||||
|
|
||||||
namespace Slack\Models;
|
namespace Slack\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
use Illuminate\Support\Facades\Log;
|
||||||
|
|
||||||
use App\Models\Slack\Channel;
|
use App\Models\Slack\Channel;
|
||||||
use App\Models\Slack\Enterprise as AppEnterprise;
|
use App\Models\Slack\Enterprise as AppEnterprise;
|
||||||
use App\Models\Slack\Team as AppTeam;
|
use App\Models\Slack\Team as AppTeam;
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Model;
|
|
||||||
use Illuminate\Support\Facades\Log;
|
|
||||||
use Slack\Traits\ScopeActive;
|
use Slack\Traits\ScopeActive;
|
||||||
|
|
||||||
class User extends Model
|
class User extends Model
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
namespace Slack\Options;
|
namespace Slack\Options;
|
||||||
|
|
||||||
use Illuminate\Support\Facades\Log;
|
use Illuminate\Support\Facades\Log;
|
||||||
|
|
||||||
use Slack\Message;
|
use Slack\Message;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
namespace Slack\Options;
|
namespace Slack\Options;
|
||||||
|
|
||||||
use Illuminate\Http\Request;
|
|
||||||
use Illuminate\Support\Facades\Log;
|
use Illuminate\Support\Facades\Log;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -12,7 +11,7 @@ use Illuminate\Support\Facades\Log;
|
|||||||
*/
|
*/
|
||||||
class Unknown extends Base
|
class Unknown extends Base
|
||||||
{
|
{
|
||||||
public function __construct(Request $request)
|
public function __construct(array $request)
|
||||||
{
|
{
|
||||||
Log::notice(sprintf('SOU:UNKNOWN Slack Interaction Option received [%s]',get_class($this)),['m'=>__METHOD__]);
|
Log::notice(sprintf('SOU:UNKNOWN Slack Interaction Option received [%s]',get_class($this)),['m'=>__METHOD__]);
|
||||||
|
|
||||||
|
@ -5,6 +5,7 @@ namespace Slack\Providers;
|
|||||||
use Illuminate\Notifications\ChannelManager;
|
use Illuminate\Notifications\ChannelManager;
|
||||||
use Illuminate\Support\Facades\Notification;
|
use Illuminate\Support\Facades\Notification;
|
||||||
use Illuminate\Support\ServiceProvider;
|
use Illuminate\Support\ServiceProvider;
|
||||||
|
|
||||||
use Slack\API;
|
use Slack\API;
|
||||||
use Slack\Channels\SlackBotChannel;
|
use Slack\Channels\SlackBotChannel;
|
||||||
use Slack\Console\Commands\SlackSocketClient;
|
use Slack\Console\Commands\SlackSocketClient;
|
||||||
|
@ -4,6 +4,7 @@ namespace Slack\Response;
|
|||||||
|
|
||||||
use Illuminate\Support\Facades\App;
|
use Illuminate\Support\Facades\App;
|
||||||
use Illuminate\Support\Facades\Log;
|
use Illuminate\Support\Facades\Log;
|
||||||
|
|
||||||
use Slack\Base as SlackBase;
|
use Slack\Base as SlackBase;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -67,6 +68,6 @@ class Base extends SlackBase implements \JsonSerializable
|
|||||||
*/
|
*/
|
||||||
public function jsonSerialize()
|
public function jsonSerialize()
|
||||||
{
|
{
|
||||||
return $this->_data ? $this->_data : new \stdClass;
|
return $this->_data ?: new \stdClass;
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user