diff --git a/synapse/push/emailpusher.py b/synapse/push/emailpusher.py
index 4f13c0418a..cf5abdfbda 100644
--- a/synapse/push/emailpusher.py
+++ b/synapse/push/emailpusher.py
@@ -21,8 +21,6 @@ from twisted.internet.interfaces import IDelayedCall
from synapse.metrics.background_process_metrics import run_as_background_process
from synapse.push import Pusher, PusherConfig, PusherConfigException, ThrottleParams
from synapse.push.mailer import Mailer
-from synapse.push.push_types import EmailReason
-from synapse.storage.databases.main.event_push_actions import EmailPushAction
from synapse.util.threepids import validate_email
if TYPE_CHECKING:
@@ -192,7 +190,7 @@ class EmailPusher(Pusher):
# we then consider all previously outstanding notifications
# to be delivered.
- reason: EmailReason = {
+ reason = {
"room_id": push_action["room_id"],
"now": self.clock.time_msec(),
"received_at": received_at,
@@ -277,7 +275,7 @@ class EmailPusher(Pusher):
return may_send_at
async def sent_notif_update_throttle(
- self, room_id: str, notified_push_action: EmailPushAction
+ self, room_id: str, notified_push_action: dict
) -> None:
# We have sent a notification, so update the throttle accordingly.
# If the event that triggered the notif happened more than
@@ -317,9 +315,7 @@ class EmailPusher(Pusher):
self.pusher_id, room_id, self.throttle_params[room_id]
)
- async def send_notification(
- self, push_actions: List[EmailPushAction], reason: EmailReason
- ) -> None:
+ async def send_notification(self, push_actions: List[dict], reason: dict) -> None:
logger.info("Sending notif email for user %r", self.user_id)
await self.mailer.send_notification_mail(
|