{"action":"created","issue":{"url":"https://api.github.com/repos/ably/ably-js/issues/233","repository_url":"https://api.github.com/repos/ably/ably-js","labels_url":"https://api.github.com/repos/ably/ably-js/issues/233/labels{/name}","comments_url":"https://api.github.com/repos/ably/ably-js/issues/233/comments","events_url":"https://api.github.com/repos/ably/ably-js/issues/233/events","html_url":"https://github.com/ably/ably-js/pull/233","id":132766570,"number":233,"title":"Presence action string","user":{"login":"mattheworiordan","id":43789,"avatar_url":"https://avatars.githubusercontent.com/u/43789?v=3","gravatar_id":"","url":"https://api.github.com/users/mattheworiordan","html_url":"https://github.com/mattheworiordan","followers_url":"https://api.github.com/users/mattheworiordan/followers","following_url":"https://api.github.com/users/mattheworiordan/following{/other_user}","gists_url":"https://api.github.com/users/mattheworiordan/gists{/gist_id}","starred_url":"https://api.github.com/users/mattheworiordan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattheworiordan/subscriptions","organizations_url":"https://api.github.com/users/mattheworiordan/orgs","repos_url":"https://api.github.com/users/mattheworiordan/repos","events_url":"https://api.github.com/users/mattheworiordan/events{/privacy}","received_events_url":"https://api.github.com/users/mattheworiordan/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"SimonWoolf","id":5908687,"avatar_url":"https://avatars.githubusercontent.com/u/5908687?v=3","gravatar_id":"","url":"https://api.github.com/users/SimonWoolf","html_url":"https://github.com/SimonWoolf","followers_url":"https://api.github.com/users/SimonWoolf/followers","following_url":"https://api.github.com/users/SimonWoolf/following{/other_user}","gists_url":"https://api.github.com/users/SimonWoolf/gists{/gist_id}","starred_url":"https://api.github.com/users/SimonWoolf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SimonWoolf/subscriptions","organizations_url":"https://api.github.com/users/SimonWoolf/orgs","repos_url":"https://api.github.com/users/SimonWoolf/repos","events_url":"https://api.github.com/users/SimonWoolf/events{/privacy}","received_events_url":"https://api.github.com/users/SimonWoolf/received_events","type":"User","site_admin":false},"milestone":null,"comments":15,"created_at":"2016-02-10T17:31:29Z","updated_at":"2016-02-11T12:33:54Z","closed_at":"2016-02-11T09:11:23Z","pull_request":{"url":"https://api.github.com/repos/ably/ably-js/pulls/233","html_url":"https://github.com/ably/ably-js/pull/233","diff_url":"https://github.com/ably/ably-js/pull/233.diff","patch_url":"https://github.com/ably/ably-js/pull/233.patch"},"body":"Whilst working on the Realtime Presence documentation today, I found that the demo I was writing was not very intuitive, see https://jsbin.ably.io/oxituz/3/edit\r\n\r\nThe problem is simply that the action field is an integer value for the [`PresenceMessage.Action` enum like object](https://github.com/ably/ably-js/blob/master/common/lib/types/presencemessage.js#L14-L20), yet that enum is not available to the developer consuming the API, unlike pretty much all other client libraries we have implemented which expose the Enum or some constant to access the meaningful part of the enum.\r\n\r\nI believe that in order to make our client library API easier for developers to use, we should change the `action` attribute of a PresenceMessage from an integer into a string when received (via REST or Realtime), and then convert back to an integer when published to Ably. I am sure we could come up with a far more robust way of doing this than this implementation, but as far as I can see this works, and I'd be happy to add an issue to improve this design later.\r\n\r\n@paddybyers @SimonWoolf WDYT?"},"comment":{"url":"https://api.github.com/repos/ably/ably-js/issues/comments/182837688","html_url":"https://github.com/ably/ably-js/pull/233#issuecomment-182837688","issue_url":"https://api.github.com/repos/ably/ably-js/issues/233","id":182837688,"user":{"login":"mattheworiordan","id":43789,"avatar_url":"https://avatars.githubusercontent.com/u/43789?v=3","gravatar_id":"","url":"https://api.github.com/users/mattheworiordan","html_url":"https://github.com/mattheworiordan","followers_url":"https://api.github.com/users/mattheworiordan/followers","following_url":"https://api.github.com/users/mattheworiordan/following{/other_user}","gists_url":"https://api.github.com/users/mattheworiordan/gists{/gist_id}","starred_url":"https://api.github.com/users/mattheworiordan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattheworiordan/subscriptions","organizations_url":"https://api.github.com/users/mattheworiordan/orgs","repos_url":"https://api.github.com/users/mattheworiordan/repos","events_url":"https://api.github.com/users/mattheworiordan/events{/privacy}","received_events_url":"https://api.github.com/users/mattheworiordan/received_events","type":"User","site_admin":false},"created_at":"2016-02-11T12:33:54Z","updated_at":"2016-02-11T12:33:54Z","body":"@SimonWoolf can you bump the version and release this please?"}}