Open
Description
This issue has been migrated from #11976.
When generating email notifications Synapse fetches the event before and after the event which caused the notification to include context in the email.
Unfortunately this won't work well for threads where the "event" before and after aren't necessarily linear with what the person was replying to. We should fetch the event before and after that are in the same thread.