igpapi — Instagram private API Simulator for Node.js (API reference) 4.19.0
    Preparing search index...

    Variable DirectThreadScreenConst

    DirectThreadScreen: ScreenDefinition<
        "DirectThread",
        "screen",
        | {
            kind: "thread";
            send_attribution?: | "inbox"
            | "inbox_new_message"
            | "message_button"
            | "direct_thread_creation_omnipicker";
            thread: {
                is_group: boolean;
                muted?: boolean;
                preview: readonly {
                    client_context?: string;
                    command_count?: number;
                    edit_count?: number;
                    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: (...)
                        | (...); pk: string; url: string }[];
                    };
                    message_ephemeral_lifetime_ms?: string;
                    text?: string;
                    timestamp: string;
                    user_id: string;
                }[];
                thread_id: string;
                thread_title: string;
                thread_v2_id?: string;
                users: readonly {
                    fbid_v2?: string;
                    full_name: string;
                    pk: string;
                    username: string;
                }[];
            };
        }
        | {
            kind: "recipient";
            recipient: string;
            send_attribution?: | "inbox"
            | "inbox_new_message"
            | "message_button"
            | "direct_thread_creation_omnipicker";
        }
        | {
            kind: "created";
            target_user_ids: readonly string[];
            thread_id: string;
            thread_v2_id: string;
        },
        {
            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 {
                client_context?: string;
                command_count?: number;
                edit_count?: number;
                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 }[];
                };
                message_ephemeral_lifetime_ms?: string;
                text?: string;
                timestamp: string;
                user_id: string;
            }[];
            thread: {
                is_group: boolean;
                muted?: boolean;
                thread_id: string;
                thread_title: string;
                thread_v2_id?: string;
            };
            users: readonly {
                fbid_v2?: string;
                full_name: string;
                pk: string;
                username: string;
            }[];
        },
        | {
            has_messages: boolean;
            is_group: false;
            ordinal_reserved?: boolean;
            participants: readonly {
                fbid_v2?: string;
                full_name: string;
                pk: string;
                username: string;
            }[];
            peer_user_fbid?: string;
            peer_user_id?: string;
            send_attribution?: | "inbox"
            | "inbox_new_message"
            | "message_button"
            | "direct_thread_creation_omnipicker";
            thread_id: string;
            thread_title: string;
            thread_v2_id?: string;
        }
        | {
            has_messages: boolean;
            is_group: true;
            lead_user_id?: string;
            ordinal_reserved?: boolean;
            participants: readonly {
                fbid_v2?: string;
                full_name: string;
                pk: string;
                username: string;
            }[];
            send_attribution?: | "inbox"
            | "inbox_new_message"
            | "message_button"
            | "direct_thread_creation_omnipicker";
            thread_id: string;
            thread_title: string;
            thread_v2_id?: string;
        },
        | IgApiError
        | HttpRequestError
        | ScreenDataError
        | DirectInboxSeqIdUnknownError
        | DirectThreadNotFoundByParticipantsError,
        | PlainJsonApiHttp
        | MobileSession
        | MobileDevice
        | GraphqlJsonHttp
        | MobileApplication
        | MobileNavigation
        | AndroidQuickPromotionStash
        | MobileUserFlows,
        DirectThreadActions,
        DirectThreadItems,
        never,
        never,
    > = ...

    DirectThreadFragment:direct_thread, a conversation.

    Three entries, a sum on the input; all open a conversation that exists:

    • an existing thread, opened from a list row (kind: 'thread'): the inbox's or the "New message" picker's thread row. The enter sends a group's join requests, brings the thread to front, subscribes a one-to-one peer's presence and, when the app does not hold the conversation locally (MobileAccountState.directLoadedThreads), loads it; a stored conversation shows the row.
    • a picked recipient (kind: 'recipient'), from the inbox's "New message" picker: the participant lookup (direct_v2/threads/get_by_participants/) runs while the picker is still in front — the app's order — and the conversation it answers with (thread) is shown from that answer, with no presence subscribed: in 1:1 the answer names a hidden earlier thread with no messages, and the app shows that empty conversation and subscribes nothing (owner decision, 2026-10-24: the picker always opens a thread). An answer without a thread is not a conversation this model can show: the typed DirectThreadNotFoundByParticipantsError, raised before the screen comes to front.
    • a created group (kind: 'created'), from the group picker's createGroup: the input carries the ids the creation answered (thread_id, thread_v2_id) and the picked people in pick order (target_user_ids). The participant lookup that follows the creation is sent by the picker's createGroup while the group picker is still in front, before this entry (the creation, then the lookup 0.15 s later in 451, both on the picker's chain); its answer for a just-created group names no conversation, so nothing is read from it. This entry yields the navigation, sends the Direct thread's quick-promotion batch (QuickPromotionSurfaceQueryV3), then IGDirectGetThreadQuery (min_uq_seq_id the inbox sequence plus one), and shows the thread from that answer. No presence is subscribed.

    Actions take no list element as an argument: a reaction is the message's own react, the nickname editor is the participant's own openNicknameEditor, and each item reads the thread its action sends from this screen's state (its host's state), never from a copy in its entry. The handle's data is under data (thread.data.thread); it declares no main identifier, because the thread's ids live inside the thread member of its data.

    The theme and nickname requests live on their own screens (DirectCustomizeChat / DirectThreadThemePicker, DirectThreadNicknameChange).

    Guide: A conversation