{"action":"closed","issue":{"url":"https://api.github.com/repos/matrix-org/matrix-python-sdk/issues/46","repository_url":"https://api.github.com/repos/matrix-org/matrix-python-sdk","labels_url":"https://api.github.com/repos/matrix-org/matrix-python-sdk/issues/46/labels{/name}","comments_url":"https://api.github.com/repos/matrix-org/matrix-python-sdk/issues/46/comments","events_url":"https://api.github.com/repos/matrix-org/matrix-python-sdk/issues/46/events","html_url":"https://github.com/matrix-org/matrix-python-sdk/issues/46","id":175385368,"number":46,"title":"Event listeners (and filtering) for state events","user":{"login":"Half-Shot","id":2072976,"avatar_url":"https://avatars.githubusercontent.com/u/2072976?v=3","gravatar_id":"","url":"https://api.github.com/users/Half-Shot","html_url":"https://github.com/Half-Shot","followers_url":"https://api.github.com/users/Half-Shot/followers","following_url":"https://api.github.com/users/Half-Shot/following{/other_user}","gists_url":"https://api.github.com/users/Half-Shot/gists{/gist_id}","starred_url":"https://api.github.com/users/Half-Shot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Half-Shot/subscriptions","organizations_url":"https://api.github.com/users/Half-Shot/orgs","repos_url":"https://api.github.com/users/Half-Shot/repos","events_url":"https://api.github.com/users/Half-Shot/events{/privacy}","received_events_url":"https://api.github.com/users/Half-Shot/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"Half-Shot","id":2072976,"avatar_url":"https://avatars.githubusercontent.com/u/2072976?v=3","gravatar_id":"","url":"https://api.github.com/users/Half-Shot","html_url":"https://github.com/Half-Shot","followers_url":"https://api.github.com/users/Half-Shot/followers","following_url":"https://api.github.com/users/Half-Shot/following{/other_user}","gists_url":"https://api.github.com/users/Half-Shot/gists{/gist_id}","starred_url":"https://api.github.com/users/Half-Shot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Half-Shot/subscriptions","organizations_url":"https://api.github.com/users/Half-Shot/orgs","repos_url":"https://api.github.com/users/Half-Shot/repos","events_url":"https://api.github.com/users/Half-Shot/events{/privacy}","received_events_url":"https://api.github.com/users/Half-Shot/received_events","type":"User","site_admin":false},"assignees":[{"login":"Half-Shot","id":2072976,"avatar_url":"https://avatars.githubusercontent.com/u/2072976?v=3","gravatar_id":"","url":"https://api.github.com/users/Half-Shot","html_url":"https://github.com/Half-Shot","followers_url":"https://api.github.com/users/Half-Shot/followers","following_url":"https://api.github.com/users/Half-Shot/following{/other_user}","gists_url":"https://api.github.com/users/Half-Shot/gists{/gist_id}","starred_url":"https://api.github.com/users/Half-Shot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Half-Shot/subscriptions","organizations_url":"https://api.github.com/users/Half-Shot/orgs","repos_url":"https://api.github.com/users/Half-Shot/repos","events_url":"https://api.github.com/users/Half-Shot/events{/privacy}","received_events_url":"https://api.github.com/users/Half-Shot/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2016-09-07T00:35:24Z","updated_at":"2016-10-12T14:54:21Z","closed_at":"2016-10-12T14:54:21Z","body":"Following conversation on #43:\r\n\r\n> Happy with #44 for keeping old functionality.\r\n> \r\n> Now, onto the other issues:\r\n> > there are so many different ways to divide the events up into groups that one may want to listen to. For example, currently per-room and per-client listeners are supported (modulo this bug report); the docstring (\"Incoming event callbacks\") seems to also indicate per-user listeners.\r\n> \r\n> Regrettably, we do not have per user listeners. Users are 'fun' because we can either have profile wide changes or room wide changes to them (via m.room.member events which usually but not always are global changes, so context is everything!) . \r\n> \r\n> > I find that behaviour pretty simple and intuitive, but we could be more granular adding arguments to the two add_listener functions (like event_type='m.room.message' or event_family='state')\r\n> \r\n> I like this. It might be the best way to do it because I think specific *functions* for each type is ridiculous. Potentially you might want to add a few wrappers for things like topic, but I'm not fussed. Event family is probably overkill, ``add_state_listener`` and ``add_listener`` would be quite fine. I also would add an option for exclusivity if people want it.\r\n> \r\n> You'd end up with something like:\r\n> ``add_state_listener(func, event_type=None, exclusive=False)``\r\n> \r\n\r\n"}}
{"actor":{"display_login":"Half-Shot"}}