Minor fixes
This commit is contained in:
parent
1529f470fa
commit
2c791ccead
@ -44,6 +44,7 @@ abstract class Base
|
|||||||
*
|
*
|
||||||
* @param bool $create
|
* @param bool $create
|
||||||
* @return Channel|null
|
* @return Channel|null
|
||||||
|
* @todo Enable simulating an existing channel, using FALSE (dont create), 0 (create dont save), 1 (create and save)
|
||||||
*/
|
*/
|
||||||
final public function channel(bool $create=FALSE): ?Channel
|
final public function channel(bool $create=FALSE): ?Channel
|
||||||
{
|
{
|
||||||
|
@ -73,7 +73,7 @@ final class CheckRequest
|
|||||||
return response('',200);
|
return response('',200);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
Log::debug(sprintf('%s:Incoming Request Allowed',static::LOGKEY),['m'=>__METHOD__,'e'=>$event->enterprise_id,'t'=>$event->team_id,'eo'=>$event->enterprise()->id,'to'=>$event->team()]);
|
Log::debug(sprintf('%s:Incoming Request Allowed [%s/%s]',static::LOGKEY,$event->enterprise_id,$event->team_id),['m'=>__METHOD__]);
|
||||||
|
|
||||||
return $next($request);
|
return $next($request);
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,7 @@ final class DeleteResponse extends Job
|
|||||||
*/
|
*/
|
||||||
public function __construct(string $url)
|
public function __construct(string $url)
|
||||||
{
|
{
|
||||||
$this->_data['url'] = $url;
|
$this->url = $url;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -193,6 +193,7 @@ final class Message extends BlockKit
|
|||||||
*/
|
*/
|
||||||
public function respond(string $url,Carbon $delete=NULL)
|
public function respond(string $url,Carbon $delete=NULL)
|
||||||
{
|
{
|
||||||
|
// @todo change this to use Http::class or the API?
|
||||||
if (! $delete && $this->selfdestruct)
|
if (! $delete && $this->selfdestruct)
|
||||||
$delete = $this->selfdestruct;
|
$delete = $this->selfdestruct;
|
||||||
|
|
||||||
@ -227,7 +228,7 @@ final class Message extends BlockKit
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($delete) {
|
if ($delete) {
|
||||||
Log::debug(sprintf('%s:Scheduling Delete of [%s:%s] on [%s]',static::LOGKEY,object_get($this->o,'channel_id',$this->o->id),$response->ts,$delete->format('Y-m-d')),['m'=>__METHOD__]);
|
Log::debug(sprintf('%s:Scheduling Delete of [%s:%s] on [%s]',static::LOGKEY,object_get($this->o,'channel_id',$this->o->id),$url,$delete->format('Y-m-d')),['m'=>__METHOD__]);
|
||||||
|
|
||||||
// Queue the delete of the response if requested
|
// Queue the delete of the response if requested
|
||||||
dispatch((new DeleteResponse($url))->onQueue('slack')->delay($delete));
|
dispatch((new DeleteResponse($url))->onQueue('slack')->delay($delete));
|
||||||
|
Loading…
Reference in New Issue
Block a user