Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

App Shortcut returns wrong actionName #505

Closed
TomBrien opened this issue Dec 2, 2019 · 2 comments
Closed

App Shortcut returns wrong actionName #505

TomBrien opened this issue Dec 2, 2019 · 2 comments

Comments

@TomBrien
Copy link
Member

TomBrien commented Dec 2, 2019

As reported by tom_I on forums the app shortcut menu and the widgets (also app shortcut but also today screen) are not sending consistent actionNames on ios.action_fired. After a little testing I’ve confirmed that the shortcut menu is sending the value from the text field whereas the widgets and watch are correctly using the value from name. In the example below, the same action is used throughout.

Event 2 fired 8:49 AM:

{
    "event_type": "ios.action_fired",
    "data": {
        "sourceDeviceName": "Tom’s iPhone",
        "sourceDeviceID": "toms_iphone",
        "sourceDevicePermanentID": "xxx",
        "actionID": "67EC7179-290B-4798-9D27-B2B4F3B5F3E1",
        "actionName": "LivingRoomToggle",
        "triggerSource": "widget"
    },
    "origin": "REMOTE",
    "time_fired": "2019-12-02T08:49:02.564787+00:00",
    "context": {
        "id": "a81be075b8694b7e871857dd6c142db2",
        "parent_id": null,
        "user_id": "xxx"
    }
}

Event 1 fired 8:48 AM:

{
    "event_type": "ios.action_fired",
    "data": {
        "sourceDeviceName": "Tom’s iPhone",
        "sourceDevicePermanentID": "xxx",
        "actionName": "Living Room Lights",
        "sourceDeviceID": "toms_iphone",
        "actionID": "67EC7179-290B-4798-9D27-B2B4F3B5F3E1",
        "triggerSource": "appShortcut"
    },
    "origin": "REMOTE",
    "time_fired": "2019-12-02T08:48:52.257910+00:00",
    "context": {
        "id": "de55dab4ccc14ab9ad6943b881605d53",
        "parent_id": null,
        "user_id": "xxx"
    }
}

Event 0 fired 8:48 AM:

{
    "event_type": "ios.action_fired",
    "data": {
        "sourceDeviceName": "Tom’s iPhone",
        "triggerSource": "widget",
        "sourceDevicePermanentID": "xxx",
        "sourceDeviceID": "toms_iphone",
        "actionID": "67EC7179-290B-4798-9D27-B2B4F3B5F3E1",
        "actionName": "LivingRoomToggle"
    },
    "origin": "REMOTE",
    "time_fired": "2019-12-02T08:48:42.909484+00:00",
    "context": {
        "id": "3748369d41a3490689bcda30e563d11a",
        "parent_id": null,
        "user_id": "xxxx"
    }
}
@olbjan
Copy link
Contributor

olbjan commented Dec 2, 2019

Apparently Widgets and appShortcuts use different sources for what to post to the Event bus - one uses action name, the other action text.

@TomBrien
Copy link
Member Author

TomBrien commented Dec 2, 2019

Ok little update on what I have found. The object used for the actions on the shortcut menu are defined here. But I believe are forced to used the same dictionary definition that "Send Location" uses which is defined here. We see same that the action.name is not used just a localized version of self.text. Basically an extra key is needed to allow different text and actionsNames.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants