-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Send replies from a journalist to a source #240
Conversation
0ba6782
to
8f3faed
Compare
We need to allow `size` to be NULL becuause when we get a response back from the API when we post a reply, the `size` field is not present. Subsequently, we cannot have `size` be a mandatory argument to __init__.
8f3faed
to
d7c1e0e
Compare
hey @creviera! want to take this through the paces (i.e. run through the test plan here in your dev env and report back on this PR)? |
I was able to confirm @heartsucker's tests:
I took some notes along the way while trying to keep tests within the scope of the reply feature. Sounds like server-defined ordering is happening in a follow up PR, but I documented my experience anyway. [No Reply Auto-sync] [Offline Reply Crash]
[Re-rendering conversation items] [Unseen Submission] |
The ordering issue is documented in #226
This sounds like a pre-existing bug that crept in when we merged #216.
This sounds like a bug anyway if a source submits many messages. We don't have an
But this one is a legit bug. So I propose we fix that one in this PR, and open tickets for the other. @redshiftzero and I talked about keeping this PR tightly scoped for only the most basic functionality. Once this gets in, we can tackle the rest. |
Previously, an exception would occur due to self.api being None when a user is not logged in. Since we're going to address this soon by, e.g. greying out the reply box when we're not logged in, let's disallow sending the reply if the journalist is not logged in. We'll also want to emit the failed signal to let the developer know what has happened.
5d798b6
to
107d153
Compare
hey so there was some discussion in gitter about what we should actually do with respect to not logged in users (i.e. the we can then implement the behavior we agree on with @ninavizz in #243 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @heartsucker and @creviera for the careful review!
Fixes #16
This PR does implements the following behavior:
reply.filename
to order messages in the UI, but for now we are naively assuming order sent == order received (i.e., not implementing that behavior). We have additional tickets that will change the underlying DB and this ticket was annoying enough to close as is that I think it's preferable to get this base behavior in now and the add the server-defined ordering in a follow up.Testing
--sdc-home
CLI arg)abort(500)
on the reply endpoint cause the bubble to turn red