services:
    d2_chat.twig.chat_extension:
        class:          D2\ChatBundle\Twig\ChatTwigExtension
        arguments:      [@doctrine, @service_container]
        tags:
            - { name: twig.extension }

    message_send_listener:
        class: D2\ChatBundle\EventListener\ChatListener
        arguments: [@fos_message.message_manager, @doctrine.orm.entity_manager, @router]
        tags:
            - { name: kernel.event_subscriber }
