Fix victorops recovery alerts (#9651)

* send entity ID as string

VO will not accept an int as an entity ID, this causes issues when issuing recovery alerts as the entity_id is the only way to link incidents.  I have tested this with VO and incidents will alert AND recover.

* change from str() to strval() which is the correct function
This commit is contained in:
Alex Typaldos
2019-01-12 13:51:52 -05:00
committed by Tony Murray
parent 6fc8173f84
commit 29f8a8d4a3

View File

@@ -41,7 +41,7 @@ class Victorops extends Transport
$url = $opts['url'];
$protocol = array(
'entity_id' => ($obj['id'] ? $obj['id'] : $obj['uid']),
'entity_id' => strval($obj['id'] ? $obj['id'] : $obj['uid']),
'state_start_time' => strtotime($obj['timestamp']),
'entity_display_name' => $obj['title'],
'state_message' => $obj['msg'],