mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-10-01 11:49:51 -04:00
Only import email pusher if email notifs are on
This commit is contained in:
parent
ebbabc4986
commit
937c407eef
@ -1,12 +1,14 @@
|
|||||||
from httppusher import HttpPusher
|
from httppusher import HttpPusher
|
||||||
from emailpusher import EmailPusher
|
|
||||||
|
|
||||||
PUSHER_TYPES = {
|
|
||||||
'http': HttpPusher,
|
|
||||||
'email': EmailPusher,
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
def create_pusher(hs, pusherdict):
|
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:
|
if pusherdict['kind'] in PUSHER_TYPES:
|
||||||
return PUSHER_TYPES[pusherdict['kind']](hs, pusherdict)
|
return PUSHER_TYPES[pusherdict['kind']](hs, pusherdict)
|
||||||
|
Loading…
Reference in New Issue
Block a user