Skip to content

Fix problems in mailbox view

Alex requested to merge fix-mailbox-quotation-bug into master

What does this MR do?

Fixes problems in the mailbox that I introduced in !1239 (merged). Some of the 'sender' and/or 'to' field of emails seem to have wrong quotation in their json (see e.g. the 'to' data in the first sentry entry below). This is a workaround that removed the wrong quotation and should fix the problem. In any case, I also made the function fall back to an empty from/to string if another error occurs, so that at least the mail list is visible.

https://sentry.io/share/issue/efb9086e624e43809c31b938f336548c/

https://sentry.io/share/issue/24ade8744c6f4f86af448238f1100e15/

https://sentry.io/share/issue/c934280dfbb444a8bb1cc66e3b4e7b02/

How confident are you it won't break things if deployed?

Rather sure that this fixes it. Can't be worse than before.

How to test

Steps a reviewer can take to verify that this MR does what it says it does e.g.

  1. Checkout branch locally
  2. Login as someone with a mailbox
  3. Go to your mailbox and see if the list of mails including the from/to fields is visible

Checklist

  • added a test, or explain why one is not needed/possible...
  • no unrelated changes
  • asked someone for a code review
  • joined #foodsharing-beta channel at https://slackin.yunity.org
  • added an entry to CHANGELOG.md (description, merge request link, username(s))
  • Once your MR has been merged, you are responsible to update the #foodsharing-beta Slack channel about what has been changed here. They will test your work in different browsers, roles or other settings
Edited by Alex

Merge request reports