Beispiel #1
0
    def get_last_inbound_sms(self, data):
        request_token = data.get("request_token")
        if not request_token:
            return {"success": False}

        webhook_secret = self.get_cached_webhook_secret(request_token)
        if not webhook_secret:
            return {"success": False}

        result = IncomingRequest.get_last_sms_by_webhook_secret(webhook_secret)
        if result:
            return {"success": True, "found": True}
        else:
            return {"success": True, "found": False}
Beispiel #2
0
def get_last_inbound_sms(request, domain):
    request_token = request.GET.get('request_token', None)
    if not request_token:
        return json_response({'success': False})

    webhook_secret = TelerivetSetupView.get_cached_webhook_secret(request_token)
    if not webhook_secret:
        return json_response({'success': False})

    result = IncomingRequest.get_last_sms_by_webhook_secret(webhook_secret)
    if result:
        return json_response({
            'success': True,
            'found': True,
        })
    else:
        return json_response({
            'success': True,
            'found': False,
        })
Beispiel #3
0
    def get_last_inbound_sms(self, data):
        request_token = data.get('request_token')
        if not request_token:
            return {'success': False}

        webhook_secret = self.get_cached_webhook_secret(request_token)
        if not webhook_secret:
            return {'success': False}

        result = IncomingRequest.get_last_sms_by_webhook_secret(webhook_secret)
        if result:
            return {
                'success': True,
                'found': True,
            }
        else:
            return {
                'success': True,
                'found': False,
            }
Beispiel #4
0
def get_last_inbound_sms(request, domain):
    request_token = request.GET.get('request_token', None)
    if not request_token:
        return json_response({'success': False})

    webhook_secret = TelerivetSetupView.get_cached_webhook_secret(request_token)
    if not webhook_secret:
        return json_response({'success': False})

    result = IncomingRequest.get_last_sms_by_webhook_secret(webhook_secret)
    if result:
        return json_response({
            'success': True,
            'found': True,
        })
    else:
        return json_response({
            'success': True,
            'found': False,
        })
Beispiel #5
0
    def get_last_inbound_sms(self, data):
        request_token = data.get('request_token')
        if not request_token:
            return {'success': False}

        webhook_secret = self.get_cached_webhook_secret(request_token)
        if not webhook_secret:
            return {'success': False}

        result = IncomingRequest.get_last_sms_by_webhook_secret(webhook_secret)
        if result:
            return {
                'success': True,
                'found': True,
            }
        else:
            return {
                'success': True,
                'found': False,
            }