diff --git a/synapse/__init__.py b/synapse/__init__.py
index a1fec8ad2b..8791c20e26 100644
--- a/synapse/__init__.py
+++ b/synapse/__init__.py
@@ -47,7 +47,7 @@ try:
except ImportError:
pass
-__version__ = "1.44.0rc1"
+__version__ = "1.44.0rc2"
if bool(os.environ.get("SYNAPSE_TEST_PATCH_LOG_CONTEXTS", False)):
# We import here so that we don't have to install a bunch of deps when
diff --git a/synapse/handlers/message.py b/synapse/handlers/message.py
index cdac53037c..ccd7827207 100644
--- a/synapse/handlers/message.py
+++ b/synapse/handlers/message.py
@@ -963,18 +963,13 @@ class EventCreationHandler:
depth=depth,
)
- old_state = None
-
# Pass on the outlier property from the builder to the event
# after it is created
if builder.internal_metadata.outlier:
- event.internal_metadata.outlier = builder.internal_metadata.outlier
-
- # Calculate the state for outliers that pass in their own `auth_event_ids`
- if auth_event_ids:
- old_state = await self.store.get_events_as_list(auth_event_ids)
-
- context = await self.state.compute_event_context(event, old_state=old_state)
+ event.internal_metadata.outlier = True
+ context = EventContext.for_outlier()
+ else:
+ context = await self.state.compute_event_context(event)
if requester:
context.app_service = requester.app_service
diff --git a/synapse/handlers/presence.py b/synapse/handlers/presence.py
index 983c837c66..404afb9402 100644
--- a/synapse/handlers/presence.py
+++ b/synapse/handlers/presence.py
@@ -52,6 +52,7 @@ import synapse.metrics
from synapse.api.constants import EventTypes, Membership, PresenceState
from synapse.api.errors import SynapseError
from synapse.api.presence import UserPresenceState
+from synapse.appservice import ApplicationService
from synapse.events.presence_router import PresenceRouter
from synapse.logging.context import run_in_background
from synapse.logging.utils import log_function
@@ -1521,10 +1522,11 @@ class PresenceEventSource(EventSource[int, UserPresenceState]):
user: UserID,
from_key: Optional[int],
limit: Optional[int] = None,
- room_ids: Optional[List[str]] = None,
+ room_ids: Optional[Collection[str]] = None,
is_guest: bool = False,
explicit_room_id: Optional[str] = None,
include_offline: bool = True,
+ service: Optional[ApplicationService] = None,
) -> Tuple[List[UserPresenceState], int]:
# The process for getting presence events are:
# 1. Get the rooms the user is in.
|