{"action":"created","issue":{"url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/issues/10742","repository_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS","labels_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/issues/10742/labels{/name}","comments_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/issues/10742/comments","events_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/issues/10742/events","html_url":"https://github.com/wordpress-mobile/WordPress-iOS/issues/10742","id":395714054,"node_id":"MDU6SXNzdWUzOTU3MTQwNTQ=","number":10742,"title":"Hooking in to publish action from share extension?","user":{"login":"ChrisHardie","id":311772,"node_id":"MDQ6VXNlcjMxMTc3Mg==","avatar_url":"https://avatars3.githubusercontent.com/u/311772?v=4","gravatar_id":"","url":"https://api.github.com/users/ChrisHardie","html_url":"https://github.com/ChrisHardie","followers_url":"https://api.github.com/users/ChrisHardie/followers","following_url":"https://api.github.com/users/ChrisHardie/following{/other_user}","gists_url":"https://api.github.com/users/ChrisHardie/gists{/gist_id}","starred_url":"https://api.github.com/users/ChrisHardie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChrisHardie/subscriptions","organizations_url":"https://api.github.com/users/ChrisHardie/orgs","repos_url":"https://api.github.com/users/ChrisHardie/repos","events_url":"https://api.github.com/users/ChrisHardie/events{/privacy}","received_events_url":"https://api.github.com/users/ChrisHardie/received_events","type":"User","site_admin":false},"labels":[{"id":515520822,"node_id":"MDU6TGFiZWw1MTU1MjA4MjI=","url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/labels/Share%20Extension","name":"Share Extension","color":"e2ccff","default":false},{"id":32404167,"node_id":"MDU6TGFiZWwzMjQwNDE2Nw==","url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/labels/[Type]%20Question","name":"[Type] Question","color":"cc317c","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2019-01-03T20:29:54Z","updated_at":"2019-01-04T18:02:03Z","closed_at":null,"author_association":"NONE","body":"### Expected behavior\r\n\r\nFor a WordPress theme with custom functionality that hooks into post status transitions (e.g. draft to publish), I expect that post publishing actions taken by the mobile app would trigger the same actions.\r\n\r\n### Actual behavior\r\n\r\nPosts created via the iOS share extension do not seem to trigger any of the usual post status transitions, and so the related theme functionality is never called.\r\n\r\n### Steps to reproduce the behavior\r\n\r\nI've tried hooking in to:\r\n\r\n* publish_post\r\n* draft_to_publish\r\n* new_to_publish\r\n* pending_to_publish\r\n* future_to_publish\r\n\r\nand none of them seem to work. My current workaround is to publish the post via the app, then edit via wp-admin and change from Published to Draft and then back to Published.\r\n\r\nI see a similar question was asked in https://github.com/wordpress-mobile/WordPress-iOS/issues/4053 but it would be great to get some more clarity here.\r\n\r\n##### Tested on [device], iOS [version], WPiOS [version]\r\n\r\nTested on an iPhone XR using iOS 12.1.2 and WPiOS 11.4.1."},"comment":{"url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/issues/comments/451520494","html_url":"https://github.com/wordpress-mobile/WordPress-iOS/issues/10742#issuecomment-451520494","issue_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/issues/10742","id":451520494,"node_id":"MDEyOklzc3VlQ29tbWVudDQ1MTUyMDQ5NA==","user":{"login":"rachelmcr","id":8658164,"node_id":"MDQ6VXNlcjg2NTgxNjQ=","avatar_url":"https://avatars2.githubusercontent.com/u/8658164?v=4","gravatar_id":"","url":"https://api.github.com/users/rachelmcr","html_url":"https://github.com/rachelmcr","followers_url":"https://api.github.com/users/rachelmcr/followers","following_url":"https://api.github.com/users/rachelmcr/following{/other_user}","gists_url":"https://api.github.com/users/rachelmcr/gists{/gist_id}","starred_url":"https://api.github.com/users/rachelmcr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rachelmcr/subscriptions","organizations_url":"https://api.github.com/users/rachelmcr/orgs","repos_url":"https://api.github.com/users/rachelmcr/repos","events_url":"https://api.github.com/users/rachelmcr/events{/privacy}","received_events_url":"https://api.github.com/users/rachelmcr/received_events","type":"User","site_admin":false},"created_at":"2019-01-04T18:02:03Z","updated_at":"2019-01-04T18:02:03Z","author_association":"MEMBER","body":"cc @aerych as you answered the previous issue mentioned here."}}
{"actor":{"display_login":"rachelmcr"}}