Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

emailAddress, phoneNumber, and list do not handle variables correctly #36

Closed
mikeogezi opened this issue Dec 6, 2023 · 2 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@mikeogezi
Copy link
Contributor

mikeogezi commented Dec 6, 2023

Describe the bug
When emailAddress, phoneNumber, or list are used with a variable the produced Shortcut treats the variable as some sort of literal.

To Reproduce

@e = "mike@example.com"
emailAddress(e)

Debug output
The program compiles successfully, but here's an image of what happens

Screenshot 2023-12-05 at 6 57 53 PM

Expected behavior

Screenshot 2023-12-05 at 6 58 10 PM

Screenshots
See above

Version Information (please complete the following information):

  • macOS version (run uname -a): Darwin Michaels-MacBook-Air.local 23.2.0 Darwin Kernel Version 23.2.0: Fri Oct 13 09:28:08 PDT 2023; root:xnu-10002.60.54~14/RELEASE_ARM64_T8112 arm64
  • Golang version (run go version): go version go1.21.4 darwin/arm64
@mikeogezi mikeogezi added the bug Something isn't working label Dec 6, 2023
@mikeogezi mikeogezi changed the title emailAddress does not handle variables correctly emailAddress, phoneNumber, and list do not handle variables correctly Dec 6, 2023
@electrikmilk electrikmilk self-assigned this Dec 9, 2023
@electrikmilk
Copy link
Owner

This was caused by these actions accepting multiple values, and when they were implemented variables were not considered in the case of list(), but emailAddress() and phoneNumber() have a specific data structure for contact values, otherwise they allow their parameter to have a variable value, but not inline, and also only one value rather than multiple.

Thanks for catching this!

This is now fixed by 5b08264.

@electrikmilk
Copy link
Owner

list() also only allows string values and I'm not sure if maybe at the time I was confused how it would allow for inline variables as they did not work right away. This was because you need to give an item type, which is strange.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants