mirror of
https://mau.dev/maunium/synapse.git
synced 2024-11-18 16:02:15 +01:00
Only import email pusher if email notifs are on
This commit is contained in:
parent
ebbabc4986
commit
937c407eef
1 changed files with 8 additions and 6 deletions
|
@ -1,12 +1,14 @@
|
|||
from httppusher import HttpPusher
|
||||
from emailpusher import EmailPusher
|
||||
|
||||
PUSHER_TYPES = {
|
||||
'http': HttpPusher,
|
||||
'email': EmailPusher,
|
||||
}
|
||||
|
||||
|
||||
def create_pusher(hs, pusherdict):
|
||||
PUSHER_TYPES = {
|
||||
"http": HttpPusher,
|
||||
}
|
||||
|
||||
if hs.config.email_enable_notifs:
|
||||
from emailpusher import EmailPusher
|
||||
PUSHER_TYPES["email"] = EmailPusher
|
||||
|
||||
if pusherdict['kind'] in PUSHER_TYPES:
|
||||
return PUSHER_TYPES[pusherdict['kind']](hs, pusherdict)
|
||||
|
|
Loading…
Reference in a new issue