-
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
TypeError that crashes the app when sending reply #289
Comments
Potential fix (fastest) is to revert the change from #277 so that Another solution would be to wait until the database object is created before displaying it in the conversation view. This would also allow us to keep the way we add replies the same as the way we add messages, see |
Because of the restrictions on the database ( |
What if instead of displaying pending replies we just wait to update the UI after all reply operations finish, including any user input checks, handling of server errors, responses, etc. To me, it seems better to wait until we create the |
Per chat with @heartsucker another potential issue with what we're doing (generating uuids client-side and displaying reply content in th ui before it has been stored in a database) is that the content could be replaced or removed after a sync and this might be confusing to the user. Replies could also be lost because of refreshing the conversation in the gui. |
We can capture further discussion in the issue @heartsucker opened here: #294 And since this issue crashes the app, it makes sense to go with the fastest fix which is to just undo the change to the method signature. Thanks @heartsucker for pointing out that how we display and store and update replies is a larger change that needs to be scoped more! |
Description
On
master
branch, send a reply and you'll get a TypeError because add_reply takes one argument now, a Reply object, instead of a message uuid and a message string.TypeError happening here ->
securedrop-client/securedrop_client/gui/widgets.py", line 900, in send_reply self.conversation.add_reply(msg_uuid, message)
More info
We changed the
add_reply
signature here: #277. The solution should be to updatesend_reply
to first send a reply, which should create a Reply object, send, and thenadd_reply
to the ConversationView.The text was updated successfully, but these errors were encountered: