Skip to content

Commit 050e5a9

Browse files
committed
updated the activation handling so that when there is an error it will send a chat notification message with some of the info about the package and error.
1 parent 8698aa0 commit 050e5a9

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/Plugin.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ function_requirements('activate_litespeed_new');
6363
->save();
6464
myadmin_log(self::$module, 'info', 'LiteSpeed License '.$serviceClass->getId().' - Status changed to pending.', __LINE__, __FILE__, self::$module, $serviceClass->getId());
6565
$event['success'] = false;
66+
$errText = is_array($response) ? json_encode($response) : var_export($response, true);
67+
chatNotify('Failed [License '.$serviceClass->getId().'](https://my.interserver.net/admin/view_service?id='.$serviceClass->getId().'&module=licenses) LiteSpeed Activation IP:'.$serviceClass->getIp().' Type:'.$event['field1'].' - no serial returned, status pending. Response: '.$errText, 'notifications');
6668
}
6769
$event->stopPropagation();
6870
}

0 commit comments

Comments
 (0)