Skip to content

When updating a trigger, the triggerValue is ignored #911

@dynamodan

Description

@dynamodan

Given this block of code:

function updateTwilioTrigger($sid, $count = 10) {
    
    $client = new \Twilio\Rest\Client(TWILIO_SMS_ACCOUNT_SID, TWILIO_SMS_AUTH_TOKEN);

    $trigger = $client->usage->triggers($sid)->update([
        'friendlyName' => "admin/cli.php updated trigger ".date("Y-m-d H:i:s"),
        'triggerValue' => "+".$count
    ]);
    
    return $trigger;
}

The triggerValue key in the returned trigger object stays the same, and the trigger is not fired.

Expected results: triggerValue should be updated, and trigger should fire again. Currently, the only way to do this is to delete the trigger and create a new one with the desired triggerValue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions