Minor fixes

This commit is contained in:
Deon George 2022-09-05 17:17:35 +10:00
parent 1529f470fa
commit 2c791ccead
4 changed files with 5 additions and 3 deletions

View File

@ -44,6 +44,7 @@ abstract class Base
*
* @param bool $create
* @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
{

View File

@ -73,7 +73,7 @@ final class CheckRequest
return response('',200);
} 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);
}

View File

@ -18,7 +18,7 @@ final class DeleteResponse extends Job
*/
public function __construct(string $url)
{
$this->_data['url'] = $url;
$this->url = $url;
}
/**

View File

@ -193,6 +193,7 @@ final class Message extends BlockKit
*/
public function respond(string $url,Carbon $delete=NULL)
{
// @todo change this to use Http::class or the API?
if (! $delete && $this->selfdestruct)
$delete = $this->selfdestruct;
@ -227,7 +228,7 @@ final class Message extends BlockKit
}
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
dispatch((new DeleteResponse($url))->onQueue('slack')->delay($delete));