async getAttendeeInfo()

in src/providers/MeetingProvider/MeetingManager.ts [314:339]


  async getAttendeeInfo(presentAttendeeId: string) {
    if (!this.meetingId) {
      return;
    }

    const url = `${BASE_URL}attendee?title=${encodeURIComponent(
      this.meetingId
    )}&attendee=${encodeURIComponent(presentAttendeeId)}`;

    try {
      const response = await fetch(url, {
        method: 'GET'
      });

      if (!response.ok) {
        throw new Error('Invalid server response');
      }

      const json = await response.json();
      const { AttendeeId: id, Name: name } = json.AttendeeInfo;
      return { id, name };
    } catch (e) {
      console.log(`Error fetching attendee: ${e.message}`);
      return null;
    }
  }