Explorar o código

Fix AI Companion past-meeting list Zoom API type

Use previous_meetings instead of invalid past for GET /users/me/meetings.
Treat HTTP 403 on meeting_summaries as a signal to fall back to per-meeting summary fetches.

Co-authored-by: Cursor <cursoragent@cursor.com>
huzaifahayat12 hai 2 meses
pai
achega
6e8ece2d06
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  1. 4 1
      zoom_app/ViewController.swift

+ 4 - 1
zoom_app/ViewController.swift

@@ -3472,6 +3472,8 @@ class ViewController: NSViewController {
 
     private func zoomMeetingSummariesListErrorShouldFallbackToPerMeetingFetch(data: Data, statusCode: Int) -> Bool {
         guard (200..<300).contains(statusCode) == false else { return false }
+        // Bulk list is often unavailable; a generic 403 still means "try past meetings + per-meeting summary".
+        if statusCode == 403 { return true }
         let raw = String(data: data, encoding: .utf8) ?? ""
         if raw.localizedCaseInsensitiveContains("does not contain scopes") { return true }
         if raw.localizedCaseInsensitiveContains("list_summaries") { return true }
@@ -3593,9 +3595,10 @@ class ViewController: NSViewController {
         var nextPageToken: String?
         var pageIdx = 0
         repeat {
+            // Zoom expects `previous_meetings` (not `past`) for past instances; see List meetings API.
             var components = URLComponents(string: "https://api.zoom.us/v2/users/me/meetings")!
             var items: [URLQueryItem] = [
-                URLQueryItem(name: "type", value: "past"),
+                URLQueryItem(name: "type", value: "previous_meetings"),
                 URLQueryItem(name: "page_size", value: "30")
             ]
             if let from { items.append(URLQueryItem(name: "from", value: dayFormatter.string(from: from))) }