Skip to content
Snippets Groups Projects
Commit 937c407e authored by David Baker's avatar David Baker
Browse files

Only import email pusher if email notifs are on

parent ebbabc49
No related branches found
No related tags found
No related merge requests found
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)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment