Skip to content

Wrong number #22

@erperejildo

Description

@erperejildo

When we want to call a number with +code we're sending this number without + and with an extra space like this:
+34123456789 --> 34123456789

I fixed it like with this:

if (number.length > 0) {
      if (from) {
        from = from.replace("+", "%2B");
      }     
      number = number.replace("+", "%2B");
      fetch(`https://${url}/create-new-task`, {
        headers: {
          "Content-Type": "application/x-www-form-urlencoded"
        },
        method: "POST",
        body: `From=${from}&To=${number}&Worker=${workerContactUri}&Internal=${internal}`
      })

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions