diff --git a/securedrop_client/api_jobs/uploads.py b/securedrop_client/api_jobs/uploads.py index 0589ba680..765cfe7e6 100644 --- a/securedrop_client/api_jobs/uploads.py +++ b/securedrop_client/api_jobs/uploads.py @@ -48,10 +48,12 @@ def call_api(self, api_client: API, session: Session) -> str: source_id=source.id, journalist_id=api_client.token_journalist_uuid, filename=sdk_reply.filename, + content=self.message, + is_downloaded=True, + is_decrypted=True ) session.add(reply_db_object) session.commit() - return reply_db_object.uuid def _make_call(self, encrypted_reply: str, api_client: API) -> sdclientapi.Reply: diff --git a/securedrop_client/gui/widgets.py b/securedrop_client/gui/widgets.py index cc8fb656e..474ff32b3 100644 --- a/securedrop_client/gui/widgets.py +++ b/securedrop_client/gui/widgets.py @@ -1390,9 +1390,9 @@ def clear_conversation(self): def update_conversation(self, collection: list) -> None: # clear all old items self.clear_conversation() + self.controller.session.refresh(self.source) # add new items for conversation_item in collection: - self.controller.session.refresh(conversation_item) if conversation_item.filename.endswith('msg.gpg'): self.add_message(conversation_item) elif conversation_item.filename.endswith('reply.gpg'): diff --git a/securedrop_client/logic.py b/securedrop_client/logic.py index 13f82737d..a88b15bc8 100644 --- a/securedrop_client/logic.py +++ b/securedrop_client/logic.py @@ -595,9 +595,11 @@ def send_reply(self, source_uuid: str, reply_uuid: str, message: str) -> None: self.api_job_queue.enqueue(job) def on_reply_success(self, reply_uuid: str) -> None: + logger.debug('Reply send success: {}'.format(reply_uuid)) self.reply_succeeded.emit(reply_uuid) def on_reply_failure(self, reply_uuid: str) -> None: + logger.debug('Reply send failure: {}'.format(reply_uuid)) self.reply_failed.emit(reply_uuid) def get_file(self, file_uuid: str) -> db.File: