2016-04-06 08:42:15 -06:00
|
|
|
from httppusher import HttpPusher
|
|
|
|
|
|
|
|
|
|
|
|
def create_pusher(hs, pusherdict):
|
2016-04-28 08:12:14 -06:00
|
|
|
PUSHER_TYPES = {
|
|
|
|
"http": HttpPusher,
|
|
|
|
}
|
|
|
|
|
|
|
|
if hs.config.email_enable_notifs:
|
|
|
|
from emailpusher import EmailPusher
|
|
|
|
PUSHER_TYPES["email"] = EmailPusher
|
|
|
|
|
2016-04-06 08:42:15 -06:00
|
|
|
if pusherdict['kind'] in PUSHER_TYPES:
|
|
|
|
return PUSHER_TYPES[pusherdict['kind']](hs, pusherdict)
|