mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-29 18:20:01 +00:00
Auto commit for release 'develop' on 2025-03-14
This commit is contained in:
@@ -67,21 +67,23 @@ class WebhookRepository implements WebhookRepositoryInterface, UserGroupInterfac
|
||||
public function getMessages(Webhook $webhook): Collection
|
||||
{
|
||||
return $webhook->webhookMessages()
|
||||
->orderBy('created_at', 'DESC')
|
||||
->get(['webhook_messages.*']);
|
||||
->orderBy('created_at', 'DESC')
|
||||
->get(['webhook_messages.*'])
|
||||
;
|
||||
}
|
||||
|
||||
public function getReadyMessages(Webhook $webhook): Collection
|
||||
{
|
||||
return $webhook->webhookMessages()
|
||||
->where('webhook_messages.sent', 0)
|
||||
->where('webhook_messages.errored', 0)
|
||||
->get(['webhook_messages.*'])
|
||||
->filter(
|
||||
static function (WebhookMessage $message) { // @phpstan-ignore-line
|
||||
return $message->webhookAttempts()->count() <= 2;
|
||||
}
|
||||
)->splice(0, 3);
|
||||
->where('webhook_messages.sent', 0)
|
||||
->where('webhook_messages.errored', 0)
|
||||
->get(['webhook_messages.*'])
|
||||
->filter(
|
||||
static function (WebhookMessage $message) { // @phpstan-ignore-line
|
||||
return $message->webhookAttempts()->count() <= 2;
|
||||
}
|
||||
)->splice(0, 3)
|
||||
;
|
||||
}
|
||||
|
||||
public function store(array $data): Webhook
|
||||
|
@@ -42,7 +42,6 @@ use Illuminate\Support\Collection;
|
||||
* @method checkUserGroupAccess(UserRoleEnum $role)
|
||||
* @method setUser(null|Authenticatable|User $user)
|
||||
* @method setUserGroupById(int $userGroupId)
|
||||
*
|
||||
*/
|
||||
interface WebhookRepositoryInterface
|
||||
{
|
||||
|
Reference in New Issue
Block a user