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,
|
||||||
@ -484,4 +485,4 @@ final class API
|
|||||||
|
|
||||||
return $request;
|
return $request;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -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;
|
||||||
@ -63,4 +64,4 @@ class SlackSocketClient extends Command
|
|||||||
|
|
||||||
$loop->run();
|
$loop->run();
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -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
|
||||||
{
|
{
|
||||||
@ -27,4 +27,4 @@ class EventsController extends Controller
|
|||||||
|
|
||||||
return response('Event Processed',200);
|
return response('Event Processed',200);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -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;
|
||||||
@ -177,4 +176,4 @@ class SlackAppController extends Controller
|
|||||||
'user_scope' => join(',',config('slack.user_scopes')),
|
'user_scope' => join(',',config('slack.user_scopes')),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -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;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -120,4 +121,4 @@ class InteractiveMessage extends Base
|
|||||||
return (new Message)->text('That didnt work, I didnt know what to do with your button - you might like to tell '.$this->team()->owner->slack_user);
|
return (new Message)->text('That didnt work, I didnt know what to do with your button - you might like to tell '.$this->team()->owner->slack_user);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -35,4 +35,4 @@ class Shortcut extends Base
|
|||||||
return parent::__get($key);
|
return parent::__get($key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
namespace Slack\Interactive;
|
namespace Slack\Interactive;
|
||||||
|
|
||||||
use Illuminate\Http\Request;
|
|
||||||
use Illuminate\Support\Facades\Log;
|
use Illuminate\Support\Facades\Log;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -18,4 +17,4 @@ class Unknown extends Base
|
|||||||
|
|
||||||
parent::__construct($request);
|
parent::__construct($request);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -84,4 +84,4 @@ class ViewClosed extends Base
|
|||||||
return parent::__get($key);
|
return parent::__get($key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -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
|
||||||
{
|
{
|
||||||
@ -96,4 +97,4 @@ class ViewSubmission extends Base
|
|||||||
// Return the state value, or the original block value
|
// Return the state value, or the original block value
|
||||||
return object_get($this->_data,'view.state.values.'.$key.'.'.$block_id.'.value') ?: object_get(Arr::get(object_get($this->_data,'view.blocks'),$key),'text.text','');
|
return object_get($this->_data,'view.state.values.'.$key.'.'.$block_id.'.value') ?: object_get(Arr::get(object_get($this->_data,'view.blocks'),$key),'text.text','');
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -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;
|
||||||
|
|
||||||
@ -52,4 +53,4 @@ class DeleteChat extends Job
|
|||||||
Log::error(sprintf('%s:Failed to delete slack message [%s] [%s]',static::LOGKEY,$this->ts,$e->getMessage()),['m'=>__METHOD__]);
|
Log::error(sprintf('%s:Failed to delete slack message [%s] [%s]',static::LOGKEY,$this->ts,$e->getMessage()),['m'=>__METHOD__]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -29,4 +29,4 @@ abstract class Job implements ShouldQueue
|
|||||||
{
|
{
|
||||||
return Arr::get($this->_data,$key);
|
return Arr::get($this->_data,$key);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -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;
|
||||||
|
|
||||||
@ -44,4 +45,4 @@ class TeamUpdate extends Job
|
|||||||
|
|
||||||
$this->to->save();
|
$this->to->save();
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -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
|
||||||
{
|
{
|
||||||
@ -27,4 +27,4 @@ class AppHomeOpenedListener implements ShouldQueue
|
|||||||
|
|
||||||
dispatch((new SlackHomeTabUpdate($event->user(),$event->team(TRUE),$event->tab,$event->view))->onQueue('high'));
|
dispatch((new SlackHomeTabUpdate($event->user(),$event->team(TRUE),$event->tab,$event->view))->onQueue('high'));
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -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;
|
||||||
|
|
||||||
@ -82,4 +83,4 @@ class BlockActionListener
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -35,4 +35,4 @@ class ChannelJoinListener implements ShouldQueue
|
|||||||
Log::debug(sprintf('%s:Wasnt the BOT who joined Channel [%s]',self::LOGKEY,$event->channel_id),['m'=>__METHOD__]);
|
Log::debug(sprintf('%s:Wasnt the BOT who joined Channel [%s]',self::LOGKEY,$event->channel_id),['m'=>__METHOD__]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -31,4 +31,4 @@ class ChannelLeftListener implements ShouldQueue
|
|||||||
$o->active = FALSE;
|
$o->active = FALSE;
|
||||||
$o->save();
|
$o->save();
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -29,4 +29,4 @@ class InteractiveMessageListener implements ShouldQueue
|
|||||||
Log::notice(sprintf('%s:Unhandled CALLBACK [%s]',self::LOGKEY,$event->callback_id),['m'=>__METHOD__]);
|
Log::notice(sprintf('%s:Unhandled CALLBACK [%s]',self::LOGKEY,$event->callback_id),['m'=>__METHOD__]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -35,4 +35,4 @@ class MessageListener implements ShouldQueue
|
|||||||
Log::notice(sprintf('%s:Unhandled TYPE [%s]',self::LOGKEY,$event->type),['m'=>__METHOD__]);
|
Log::notice(sprintf('%s:Unhandled TYPE [%s]',self::LOGKEY,$event->type),['m'=>__METHOD__]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -26,4 +26,4 @@ class PinAddedListener implements ShouldQueue
|
|||||||
|
|
||||||
Log::notice(sprintf('%s:Ignoring Pin Add on [%s]',static::LOGKEY,$event->ts),['m'=>__METHOD__]);
|
Log::notice(sprintf('%s:Ignoring Pin Add on [%s]',static::LOGKEY,$event->ts),['m'=>__METHOD__]);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -26,4 +26,4 @@ class PinRemovedListener implements ShouldQueue
|
|||||||
|
|
||||||
Log::debug(sprintf('%s:Ignoring Pin Remove on [%s]',static::LOGKEY,$event->ts),['m'=>__METHOD__]);
|
Log::debug(sprintf('%s:Ignoring Pin Remove on [%s]',static::LOGKEY,$event->ts),['m'=>__METHOD__]);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -26,4 +26,4 @@ class ReactionAddedListener implements ShouldQueue
|
|||||||
|
|
||||||
Log::debug(sprintf('%s:Ignoring Reaction Add [%s] on [%s]',static::LOGKEY,$event->reaction,$event->ts),['m'=>__METHOD__]);
|
Log::debug(sprintf('%s:Ignoring Reaction Add [%s] on [%s]',static::LOGKEY,$event->reaction,$event->ts),['m'=>__METHOD__]);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -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'));
|
||||||
@ -53,4 +55,4 @@ class ShortcutListener //implements ShouldQueue
|
|||||||
Log::notice(sprintf('%s:Unhandled CALLBACK [%s]',self::LOGKEY,$event->callback_id),['m'=>__METHOD__]);
|
Log::notice(sprintf('%s:Unhandled CALLBACK [%s]',self::LOGKEY,$event->callback_id),['m'=>__METHOD__]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -29,4 +29,4 @@ class ViewClosedListener implements ShouldQueue
|
|||||||
Log::notice(sprintf('%s:Unhandled CALLBACK [%s]',self::LOGKEY,$event->callback_id),['m'=>__METHOD__]);
|
Log::notice(sprintf('%s:Unhandled CALLBACK [%s]',self::LOGKEY,$event->callback_id),['m'=>__METHOD__]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -29,4 +29,4 @@ class ViewSubmissionListener implements ShouldQueue
|
|||||||
Log::notice(sprintf('%s:Unhandled CALLBACK [%s]',self::LOGKEY,$event->callback_id),['m'=>__METHOD__]);
|
Log::notice(sprintf('%s:Unhandled CALLBACK [%s]',self::LOGKEY,$event->callback_id),['m'=>__METHOD__]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -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,10 +11,10 @@ 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__]);
|
||||||
|
|
||||||
parent::__construct($request);
|
parent::__construct($request);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -20,4 +20,4 @@ final class ChannelList extends Base
|
|||||||
return object_get($this->_data,$key);
|
return object_get($this->_data,$key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -46,4 +46,4 @@ class Chat extends Base
|
|||||||
{
|
{
|
||||||
return $this->messages->first()->reply_users_count;
|
return $this->messages->first()->reply_users_count;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -24,4 +24,4 @@ class Generic extends Base
|
|||||||
return parent::__get($key);
|
return parent::__get($key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -27,4 +27,4 @@ final class Team extends Base
|
|||||||
return object_get($this->_data,'team.'.$key);
|
return object_get($this->_data,'team.'.$key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -28,4 +28,4 @@ class Test extends Base
|
|||||||
return parent::__get($key);
|
return parent::__get($key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -32,4 +32,4 @@ final class User extends Base
|
|||||||
return object_get($this->_data,'user.id');
|
return object_get($this->_data,'user.id');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -14,4 +14,4 @@ trait ScopeActive
|
|||||||
{
|
{
|
||||||
return $query->where($this->getTable().'.active',TRUE);
|
return $query->where($this->getTable().'.active',TRUE);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -43,4 +43,4 @@ app('router')
|
|||||||
'uses' => 'SlashCommandController@fire',
|
'uses' => 'SlashCommandController@fire',
|
||||||
'as' => 'slashcommand',
|
'as' => 'slashcommand',
|
||||||
]);
|
]);
|
||||||
});
|
});
|
Loading…
Reference in New Issue
Block a user