{"action":"created","issue":{"url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/issues/1093","repository_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go","labels_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/issues/1093/labels{/name}","comments_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/issues/1093/comments","events_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/issues/1093/events","html_url":"https://github.com/OpenBazaar/openbazaar-go/issues/1093","id":351275420,"node_id":"MDU6SXNzdWUzNTEyNzU0MjA=","number":1093,"title":"Failable chat messages","user":{"login":"placer14","id":305332,"node_id":"MDQ6VXNlcjMwNTMzMg==","avatar_url":"https://avatars3.githubusercontent.com/u/305332?v=4","gravatar_id":"","url":"https://api.github.com/users/placer14","html_url":"https://github.com/placer14","followers_url":"https://api.github.com/users/placer14/followers","following_url":"https://api.github.com/users/placer14/following{/other_user}","gists_url":"https://api.github.com/users/placer14/gists{/gist_id}","starred_url":"https://api.github.com/users/placer14/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/placer14/subscriptions","organizations_url":"https://api.github.com/users/placer14/orgs","repos_url":"https://api.github.com/users/placer14/repos","events_url":"https://api.github.com/users/placer14/events{/privacy}","received_events_url":"https://api.github.com/users/placer14/received_events","type":"User","site_admin":false},"labels":[{"id":354946937,"node_id":"MDU6TGFiZWwzNTQ5NDY5Mzc=","url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/labels/enhancement","name":"enhancement","color":"84b6eb","default":true},{"id":979310813,"node_id":"MDU6TGFiZWw5NzkzMTA4MTM=","url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/labels/med%20priority","name":"med priority","color":"346edb","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-08-16T16:18:01Z","updated_at":"2018-08-16T16:28:03Z","closed_at":null,"author_association":"MEMBER","body":"Chat messages are currently persisted after successfully sending the message to the remote peer. In the cases where the remote peer is offline or the node is in a high-latency environment a message may take several minutes to be successfully sent. In these cases, the chat messages appear to be persisted immediately after posting the message, but if a user were switch away and revisit the view, the recently posted message may not appear if the message has not been successfully sent at the time.\r\n\r\nSolution: \r\n- [ ] we will reorder the operations in our chat API (within `{specify api endpoints to include groupchat as well as regular chat}`) to persist the message to the local DB immediately regardless of the successful delivery of the message.\r\n- [ ] we will migrate our schema to add a `failed_reason` nullable string column to the `chat` DB table which describes the reason for the message delivery failure.\r\n- [ ] unsuccessful message delivery should populate DB record(s) w `failed_reason` with the cause of the failure\r\n- [ ] `/ob/chatmessages` response should include a new key to present this failed state to the UI\r\n```\r\n    {\r\n        \"message\": \"Tes #8\",\r\n        \"messageId\": \"QmWepAACQP3vcoXRrhz1HNftiE5G3eRKZZtgikwnXhabUE\",\r\n        \"outgoing\": true,\r\n        \"peerId\": \"\",\r\n        \"read\": false,\r\n        \"failed\": // string or bool?\r\n        \"subject\": \"QmRWDYgYTxqAJk4URoxJD2NvzkrJ3vtSWEoZY1WmS5esAs\",\r\n        \"timestamp\": \"2018-08-16T11:38:58-04:00\"\r\n    },\r\n```\r\n\r\nUI impact:\r\n- Must represent `failed` state (and reason?) to the user"},"comment":{"url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/issues/comments/413605185","html_url":"https://github.com/OpenBazaar/openbazaar-go/issues/1093#issuecomment-413605185","issue_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/issues/1093","id":413605185,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMzYwNTE4NQ==","user":{"login":"placer14","id":305332,"node_id":"MDQ6VXNlcjMwNTMzMg==","avatar_url":"https://avatars3.githubusercontent.com/u/305332?v=4","gravatar_id":"","url":"https://api.github.com/users/placer14","html_url":"https://github.com/placer14","followers_url":"https://api.github.com/users/placer14/followers","following_url":"https://api.github.com/users/placer14/following{/other_user}","gists_url":"https://api.github.com/users/placer14/gists{/gist_id}","starred_url":"https://api.github.com/users/placer14/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/placer14/subscriptions","organizations_url":"https://api.github.com/users/placer14/orgs","repos_url":"https://api.github.com/users/placer14/repos","events_url":"https://api.github.com/users/placer14/events{/privacy}","received_events_url":"https://api.github.com/users/placer14/received_events","type":"User","site_admin":false},"created_at":"2018-08-16T16:28:03Z","updated_at":"2018-08-16T16:28:03Z","author_association":"MEMBER","body":"To have the schema represent the optionality of that data, but it's not a strong requirement. We can use an empty string."}}
{"actor":{"display_login":"placer14"}}