

@allow_remote_invocation
def get_last_inbound_sms(self, data):
    request_token = self.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,
        }

dataset/ETHPy150Open dimagi/commcare-hq/corehq/messaging/smsbackends/telerivet/views.py TelerivetSetupView.get_last_inbound_sms/VarMisuse@17/27 `data`->`self`