summary refs log tree commit diff
path: root/synapse/push/pusher.py
blob: 25a45af77566e456352f77ba6143e8ff7ca75e74 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from httppusher import HttpPusher


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)