synapse-product/synapse
Richard van der Hoff 4ecf51812e
Include outlier status in str(event) for V2/V3 events (#10879)
I meant to do this before, in #10591, but because I'm stupid I forgot to do it
for V2 and V3 events.

I've factored the common code out to `EventBase` to save us having two copies
of it.

This means that for `FrozenEvent` we replace `self.get("event_id", None)` with
`self.event_id`, which I think is safe. `get()` is an alias for
`self._dict.get()`, whereas `event_id()` is an `@property` method which looks
up `self._event_id`, which is populated during construction from the same
dict. We don't seem to rely on the fallback, because if the `event_id` key is
absent from the dict then construction of the `EventBase` object will
fail.

Long story short, the only way this could change behaviour is if
`event_dict["event_id"]` is changed *after* the `EventBase` object is
constructed without updating the `_event_id` field, or vice versa - either of
which would be very problematic anyway and the behavior of `str(event)` is the
least of our worries.
2021-09-22 12:30:59 +01:00
..
_scripts Remove shebang line from module files (#10415) 2021-07-29 21:34:14 +01:00
api Rename MSC2716 things from chunk to batch to match /batch_send endpoint (#10838) 2021-09-21 15:06:28 -05:00
app Use direct references for some configuration variables (#10798) 2021-09-13 13:07:12 -04:00
appservice
config Always add local users to the user directory (#10796) 2021-09-21 12:02:34 +00:00
crypto Use direct references for some configuration variables (part 2) (#10812) 2021-09-15 08:34:52 -04:00
events Include outlier status in str(event) for V2/V3 events (#10879) 2021-09-22 12:30:59 +01:00
federation Use direct references for some configuration variables (part 2) (#10812) 2021-09-15 08:34:52 -04:00
groups Use direct references for some configuration variables (#10798) 2021-09-13 13:07:12 -04:00
handlers Rename MSC2716 things from chunk to batch to match /batch_send endpoint (#10838) 2021-09-21 15:06:28 -05:00
http Add types to http.site (#10867) 2021-09-21 16:41:27 +00:00
logging Use direct references for some configuration variables (#10798) 2021-09-13 13:07:12 -04:00
metrics
module_api Add type hints for event streams. (#10856) 2021-09-21 13:34:26 -04:00
push Use direct references for some configuration variables (part 2) (#10812) 2021-09-15 08:34:52 -04:00
replication Use direct references for some configuration variables (#10798) 2021-09-13 13:07:12 -04:00
res Allow configuration of the oEmbed URLs. (#10714) 2021-08-31 18:37:07 -04:00
rest Rename MSC2716 things from chunk to batch to match /batch_send endpoint (#10838) 2021-09-21 15:06:28 -05:00
server_notices Improve ServerNoticeServlet to avoid duplicate requests (#10679) 2021-08-27 09:16:40 +00:00
spam_checker_api
state
static Display an error page during failure of fallback UIA. (#10561) 2021-08-18 08:13:35 -04:00
storage Rename MSC2716 things from chunk to batch to match /batch_send endpoint (#10838) 2021-09-21 15:06:28 -05:00
streams Add type hints for event streams. (#10856) 2021-09-21 13:34:26 -04:00
util Track why we're evicting from caches (#10829) 2021-09-22 10:59:52 +01:00
__init__.py 1.43.0 2021-09-21 11:49:15 +01:00
event_auth.py Rename MSC2716 things from chunk to batch to match /batch_send endpoint (#10838) 2021-09-21 15:06:28 -05:00
notifier.py Add type hints for event streams. (#10856) 2021-09-21 13:34:26 -04:00
python_dependencies.py Validate new m.room.power_levels events (#10232) 2021-08-26 17:07:58 +01:00
server.py Use direct references for some configuration variables (part 2) (#10812) 2021-09-15 08:34:52 -04:00
types.py Name the type of token in "Invalid token" messages (#10815) 2021-09-14 11:25:05 +01:00
visibility.py