smsframework/IProvider.py
def _receive_message(self, message):
        """ Incoming message callback

            Calls Gateway.onReceive event hook

            Providers are required to:
            * Cast phone numbers to digits-only
            * Support both ASCII and Unicode messages
            * Populate `message.msgid` and `message.meta` fields
            * If this method fails with an exception, the provider is required to respond with an error to the service

            :type message: IncomingMessage
            :param message: The received message
            :rtype: IncomingMessage
        """
        # Populate fields
        message.provider = self.name

        # Fire the event hook
        self.gateway.onReceive(message)

        # Finish
        return message
def _receive_message(self, message):
        """ Incoming message callback

            Calls Gateway.onReceive event hook

            Providers are required to:
            * Cast phone numbers to digits-only
            * Support both ASCII and Unicode messages
            * Populate `message.msgid` and `message.meta` fields
            * If this method fails with an exception, the provider is required to respond with an error to the service

            :type message: IncomingMessage
            :param message: The received message
            :rtype: IncomingMessage
        """
        # Populate fields
        message.provider = self.name

        # Fire the event hook
        self.gateway.onReceive(message)

        # Finish
        return message
Incoming message callback

            Calls Gateway.onReceive event hook

            Providers are required to:
            * Cast phone numbers to digits-only
            * Support both ASCII and Unicode messages
            * Populate `message.msgid` and `message.meta` fields
            * If this method fails with an exception, the provider is required to respond with an error to the service

            :type message: IncomingMessage
            :param message: The received message
            :rtype: IncomingMessage