Version 4.7.0

This commit is contained in:
Neo committed 2025-12-19 16:00:35 -08:00
1 parent 517a5e1f70
commit 8ba7d43898
1933 files changed
+65613 -11332

No files matched your search

+13 -2
View File
@@ -43,7 +43,7 @@ class _webhooks extends \IPS\Task
/* Try and get a queue item */
try
{
$fire = \IPS\Db::i()->select( '*', 'core_api_webhook_fires', array( "status='pending'" ), '`time` ASC', 1 )->first();
$fire = \IPS\Db::i()->select( '*', 'core_api_webhook_fires', array( "status='pending'" ), '`time` ASC', 1, NULL, NULL, \IPS\Db::SELECT_FROM_WRITE_SERVER )->first();
try
{
@@ -51,8 +51,19 @@ class _webhooks extends \IPS\Task
{
throw new \DomainException("Webhook Disabled");
}
\IPS\Output::i()->parseFileObjectUrls( $fire['data'] );
$fire['data'] = \IPS\Output::i()->replaceEmojiWithImages( $fire['data'] );
$response = \IPS\Http\Url::external( $webhooks[ $fire['webhook'] ]['url'] )->request()->login( $webhooks[ $fire['webhook'] ]['api_key'], '' )->post( $fire['data'] );
$response = \IPS\Http\Url::external( $webhooks[ $fire['webhook'] ]['url'] )
->request()
->setHeaders(
[
'User-Agent' => "InvisionCommunity/" . \IPS\Application::load('core')->long_version ,
'Webhook-Event' => $fire['event']
]
)
->login( $webhooks[ $fire['webhook'] ]['api_key'], '' )->post( $fire['data'] );
if ( \IPS\Settings::i()->webhook_logs_success )
{