IGPAPI
    Preparing search index...

    Function directThreadDataOf

    • Internal

      Reads a thread object (the inbox thread feed's thread, or the full_json_thread_dict the conversation query returns) into the data the conversation view shows. A shape this model does not know yields undefined rather than an empty conversation. The decoded messages carry the conversation's thread_id and its participants the thread_v2_id through threadEntriesOf, the one writer of those ids; the visit's send_attribution is added by the screen, which alone has the input.

      The Direct screens' own decoder; no published declaration names it.

      Parameters

      • value: unknown

      Returns
          | {
              media: readonly (
                  | {
                      height: number;
                      media_type: 1;
                      pk: string;
                      url: string;
                      width: number;
                  }
                  | {
                      height: number;
                      media_type: 2;
                      pk: string;
                      url: string;
                      width: number;
                  }
                  | {
                      media_type: 8;
                      pk: string;
                      slides: readonly { media_type: 1
                      | 2; pk: string; url: string }[];
                  }
              )[];
              messages: readonly {
                  item_id: string;
                  item_type: string;
                  media?: | {
                      height: number;
                      media_type: 1;
                      pk: string;
                      url: string;
                      width: number;
                  }
                  | {
                      height: number;
                      media_type: 2;
                      pk: string;
                      url: string;
                      width: number;
                  }
                  | {
                      media_type: 8;
                      pk: string;
                      slides: readonly { media_type: 1
                      | 2; pk: string; url: string }[];
                  };
                  send_attribution?: string;
                  text?: string;
                  thread_id: string;
                  timestamp: string;
                  user_id: string;
              }[];
              thread: | {
                  is_group: boolean;
                  kind: "thread";
                  muted: boolean;
                  thread_id: string;
                  thread_title: string;
                  thread_v2_id: string;
              }
              | { kind: "compose"; recipient_user_id: string; thread_title: string };
              users: readonly {
                  full_name: string;
                  pk: string;
                  thread_v2_id: string;
                  username: string;
              }[];
          }
          | undefined