payload: {"action":"created","issue":{"url":"https://api.github.com/repos/zulip/zulip/issues/4120","repository_url":"https://api.github.com/repos/zulip/zulip","labels_url":"https://api.github.com/repos/zulip/zulip/issues/4120/labels{/name}","comments_url":"https://api.github.com/repos/zulip/zulip/issues/4120/comments","events_url":"https://api.github.com/repos/zulip/zulip/issues/4120/events","html_url":"https://github.com/zulip/zulip/issues/4120","id":215133067,"node_id":"MDU6SXNzdWUyMTUxMzMwNjc=","number":4120,"title":"Change consider_bankruptcy to use UserPresence instead of pointer.","user":{"login":"rishig","id":890911,"node_id":"MDQ6VXNlcjg5MDkxMQ==","avatar_url":"https://avatars2.githubusercontent.com/u/890911?v=4","gravatar_id":"","url":"https://api.github.com/users/rishig","html_url":"https://github.com/rishig","followers_url":"https://api.github.com/users/rishig/followers","following_url":"https://api.github.com/users/rishig/following{/other_user}","gists_url":"https://api.github.com/users/rishig/gists{/gist_id}","starred_url":"https://api.github.com/users/rishig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rishig/subscriptions","organizations_url":"https://api.github.com/users/rishig/orgs","repos_url":"https://api.github.com/users/rishig/repos","events_url":"https://api.github.com/users/rishig/events{/privacy}","received_events_url":"https://api.github.com/users/rishig/received_events","type":"User","site_admin":false},"labels":[{"id":759360710,"node_id":"MDU6TGFiZWw3NTkzNjA3MTA=","url":"https://api.github.com/repos/zulip/zulip/labels/GCI%20task","name":"GCI task","color":"ea8c79","default":false},{"id":461200225,"node_id":"MDU6TGFiZWw0NjEyMDAyMjU=","url":"https://api.github.com/repos/zulip/zulip/labels/area:%20misc","name":"area: misc","color":"bfd4f2","default":false},{"id":265216831,"node_id":"MDU6TGFiZWwyNjUyMTY4MzE=","url":"https://api.github.com/repos/zulip/zulip/labels/enhancement","name":"enhancement","color":"84b6eb","default":true},{"id":273621476,"node_id":"MDU6TGFiZWwyNzM2MjE0NzY=","url":"https://api.github.com/repos/zulip/zulip/labels/good%20first%20issue","name":"good first issue","color":"bfe5bf","default":true},{"id":265216832,"node_id":"MDU6TGFiZWwyNjUyMTY4MzI=","url":"https://api.github.com/repos/zulip/zulip/labels/help%20wanted","name":"help wanted","color":"159818","default":true},{"id":621149055,"node_id":"MDU6TGFiZWw2MjExNDkwNTU=","url":"https://api.github.com/repos/zulip/zulip/labels/priority:%20high","name":"priority: high","color":"5319e7","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":46,"created_at":"2017-03-17T22:00:41Z","updated_at":"2019-10-07T20:56:03Z","closed_at":null,"author_association":"COLLABORATOR","body":"Currently, the following piece of code in `static/js/unread_ui.js` puts up the bankruptcy modal if you have more than 500 unread messages and your pointer is more than 2 days in the past:\r\n\r\n```\r\n    var now = new XDate(true).getTime() / 1000;\r\n    if ((page_params.unread_count > 500) &&\r\n        (now - page_params.furthest_read_time > 60 * 60 * 24 * 2)) { // 2 days.\r\n        var unread_info = templates.render('bankruptcy_modal',\r\n                                           {unread_count: page_params.unread_count});\r\n        $('#bankruptcy-unread-count').html(unread_info);\r\n        $('#bankruptcy').modal('show');\r\n```\r\n\r\nIt would be better to use the information in UserPresence to calculate this, since `page_params.furthest_read_time` can be very far back for those that use the left sidebar to read Zulip rather than the Home view. \r\n\r\nIt would also be better to change 2 days to 4 days, so that it doesn't include just being gone for the weekend. "},"comment":{"url":"https://api.github.com/repos/zulip/zulip/issues/comments/539200545","html_url":"https://github.com/zulip/zulip/issues/4120#issuecomment-539200545","issue_url":"https://api.github.com/repos/zulip/zulip/issues/4120","id":539200545,"node_id":"MDEyOklzc3VlQ29tbWVudDUzOTIwMDU0NQ==","user":{"login":"timabbott","id":2746074,"node_id":"MDQ6VXNlcjI3NDYwNzQ=","avatar_url":"https://avatars0.githubusercontent.com/u/2746074?v=4","gravatar_id":"","url":"https://api.github.com/users/timabbott","html_url":"https://github.com/timabbott","followers_url":"https://api.github.com/users/timabbott/followers","following_url":"https://api.github.com/users/timabbott/following{/other_user}","gists_url":"https://api.github.com/users/timabbott/gists{/gist_id}","starred_url":"https://api.github.com/users/timabbott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timabbott/subscriptions","organizations_url":"https://api.github.com/users/timabbott/orgs","repos_url":"https://api.github.com/users/timabbott/repos","events_url":"https://api.github.com/users/timabbott/events{/privacy}","received_events_url":"https://api.github.com/users/timabbott/received_events","type":"User","site_admin":false},"created_at":"2019-10-07T20:56:03Z","updated_at":"2019-10-07T20:56:03Z","author_association":"MEMBER","body":"Good question!  This is a super old issue, it's possible we accidentally already fixed it.  Let me investigate."}}
other: {"actor":{"display_login":"timabbott"}}