Skip to content
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

Fixing json output html #11

Merged
merged 9 commits into from
Aug 26, 2021
Merged

Fixing json output html #11

merged 9 commits into from
Aug 26, 2021

Conversation

TornaxO7
Copy link
Owner

Should fix this issue.

- JSON of message includes `hasAttachment` key now
- JSON output shows both body types: Text and Html
- Changed `Body` struct so it can store html and text now.
Updated tests with the latest Body implementation
@TornaxO7 TornaxO7 added this to the Msg refactoring milestone Aug 22, 2021
@TornaxO7 TornaxO7 requested a review from soywod August 22, 2021 15:37
@TornaxO7 TornaxO7 self-assigned this Aug 22, 2021
@TornaxO7 TornaxO7 linked an issue Aug 22, 2021 that may be closed by this pull request
Closed
2 tasks
@TornaxO7
Copy link
Owner Author

Summary:

  • JSON Output includes hasAttachment now
  • JSON output gives text/html and text/plain back

@TornaxO7
Copy link
Owner Author

@soywod review pls

Copy link
Collaborator

@soywod soywod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there is still an issue with the formatting, could you check if the config file is taken into consideration by your IDE?

src/msg/body.rs Show resolved Hide resolved
src/msg/model.rs Outdated Show resolved Hide resolved
src/msg/model.rs Outdated Show resolved Hide resolved
src/msg/model.rs Outdated Show resolved Hide resolved
src/msg/model.rs Outdated Show resolved Hide resolved
- Removed suspicious println macro in serializer of msg... *cough cough*
- Fixed output in the "read" command
- othe small fixes
Formatted all files
@TornaxO7
Copy link
Owner Author

@soywod update

- Adding 'get_full_message' method which prints out all information of the
  message in a string
Adding MsgSerialized, a struct, which represents the "correct" serialized
version of a message because it includes another attribute: `has_attachment`.
Removed the manual serialize implementation of `Msg` and added a little more
info about the MsgSerialized.
@TornaxO7
Copy link
Owner Author

@soywod review pls

src/msg/model.rs Outdated Show resolved Hide resolved
src/msg/model.rs Outdated Show resolved Hide resolved
- Used a better condition for checking if the message includes attachments or
  not
- format fixes
@TornaxO7
Copy link
Owner Author

@soywod update

@TornaxO7 TornaxO7 merged commit e424fe9 into mail_refactor Aug 26, 2021
@soywod soywod deleted the fixing_json_output_html branch August 26, 2021 20:00
@TornaxO7 TornaxO7 mentioned this pull request Aug 26, 2021
Closed
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Read
2 participants