Gemini/GeminiIntents/GetMetaIntentHandler.swift
2021-10-09 10:17:49 -04:00

23 lines
597 B
Swift

//
// GetMetaIntentHandler.swift
// GeminiIntents
//
// Created by Shadowfacts on 10/1/21.
//
import Intents
class GetMetaIntentHandler: NSObject, GetMetaIntentHandling {
func handle(intent: GetMetaIntent, completion: @escaping (GetMetaIntentResponse) -> Void) {
guard let response = intent.response else {
completion(GetMetaIntentResponse(code: .failure, userActivity: nil))
return
}
let intentResp = GetMetaIntentResponse(code: .success, userActivity: nil)
intentResp.meta = response.meta
completion(intentResp)
}
}