IGPAPI
    Preparing search index...

    Variable DirectThreadScreenConst

    DirectThreadScreen: ScreenDefinition<
        "DirectThread",
        "screen",
        | {
            kind: "thread";
            peerUserIds: readonly string[];
            send_attribution?: string;
            thread_id: string;
            thread_v2_id: string;
        }
        | {
            kind: "recipient";
            recipient: string;
            send_attribution?: string;
            seq_id: number;
        },
        {
            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;
            }[];
        },
        unknown,
        unknown,
        unknown,
        {
            openCustomizeChat: (
                self: ScreenHandle,
                state:
                    | {
                        is_group: boolean;
                        kind: "thread";
                        peer_user_id?: string;
                        send_attribution?: string;
                        thread_id: string;
                        thread_title: string;
                        thread_v2_id: string;
                    }
                    | {
                        kind: "compose";
                        recipient_user_id: string;
                        send_attribution?: string;
                    },
            ) => ScreenEdgeBound<
                ScreenEdgeShape<
                    ScreenDefinition<
                        "DirectCustomizeChat",
                        "screen",
                        { thread_v2_id: string },
                        { thread_v2_id: string },
                        { thread_v2_id: string },

                            | InvalidSkipOrdinalsError
                            | ScreenEnterNavigationError
                            | DirectThreadNotCreatedError,
                        MobileNavigation,
                        {
                            openThemePicker: (
                                self: ScreenHandle,
                                state: { thread_v2_id: string },
                            ) => ScreenEdgeBound<
                                ScreenEdgeShape<
                                    ScreenDefinition<
                                        (...),
                                        (...),
                                        (...),
                                        (...),
                                        (...),
                                        (...),
                                        (...),
                                        (...),
                                        (...),
                                        (...),
                                    >,
                                    [],
                                >,
                                (...args: []) => Effect<(...), (...)>,
                            >;
                        },
                        Record<never, never>,
                        never,
                    >,
                    [],
                >,
                (
                    ...args: [],
                ) => Effect<
                    AssembledHandle<
                        "DirectCustomizeChat",
                        "screen",
                        { thread_v2_id: string },
                        {
                            openThemePicker: (
                                self: ScreenHandle,
                                state: { thread_v2_id: string },
                            ) => ScreenEdgeBound<
                                ScreenEdgeShape<(...), (...)>,
                                (...args: ...) => ...,
                            >;
                        },
                        Record<never, never>,
                        ScreenHandle,
                        "required",
                    >,

                        | InvalidSkipOrdinalsError
                        | ScreenDataError
                        | ScreenEnterNavigationError
                        | ScreenEnterConcurrentError
                        | ScreenNotOnTopError
                        | DirectThreadNotCreatedError
                        | ScreenEdgeInputError,
                >,
            >;
            openThreadDetails: (
                self: ScreenHandle,
                state:
                    | {
                        is_group: boolean;
                        kind: "thread";
                        peer_user_id?: string;
                        send_attribution?: string;
                        thread_id: string;
                        thread_title: string;
                        thread_v2_id: string;
                    }
                    | {
                        kind: "compose";
                        recipient_user_id: string;
                        send_attribution?: string;
                    },
            ) => ScreenEdgeBound<
                ScreenEdgeShape<
                    ScreenDefinition<
                        "DirectThreadDetails",
                        "screen",
                        {
                            is_group: boolean;
                            peer_user_id?: string;
                            thread_title: string;
                            thread_v2_id: string;
                        },
                        {
                            is_group: boolean;
                            peer_user_id?: string;
                            thread_title: string;
                            thread_v2_id: string;
                        },
                        {
                            is_group: boolean;
                            peer_user_id?: string;
                            thread_title: string;
                            thread_v2_id: string;
                        },
                        | IgApiError
                        | RequestError
                        | ParseError
                        | TransportError
                        | InvalidSkipOrdinalsError
                        | ScreenEnterNavigationError
                        | DirectThreadNotCreatedError,
                        | PlainJsonApiHttp
                        | GraphqlJsonHttp
                        | MobileApplication
                        | MobileNavigation,
                        {
                            openSharedMedia: (
                                self: ScreenHandle,
                                state: {
                                    is_group: boolean;
                                    peer_user_id?: string;
                                    thread_title: string;
                                    thread_v2_id: string;
                                },
                            ) => ScreenEdgeBound<
                                ScreenEdgeShape<
                                    ScreenDefinition<
                                        (...),
                                        (...),
                                        (...),
                                        (...),
                                        (...),
                                        (...),
                                        (...),
                                        (...),
                                        (...),
                                        (...),
                                    >,
                                    [],
                                >,
                                (...args: []) => Effect<(...), (...)>,
                            >;
                        },
                        Record<never, never>,
                        never,
                    >,
                    [],
                >,
                (
                    ...args: [],
                ) => Effect<
                    AssembledHandle<
                        "DirectThreadDetails",
                        "screen",
                        {
                            is_group: boolean;
                            peer_user_id?: string;
                            thread_title: string;
                            thread_v2_id: string;
                        },
                        {
                            openSharedMedia: (
                                self: ScreenHandle,
                                state: {
                                    is_group: boolean;
                                    peer_user_id?: (...) | (...);
                                    thread_title: string;
                                    thread_v2_id: string;
                                },
                            ) => ScreenEdgeBound<
                                ScreenEdgeShape<(...), (...)>,
                                (...args: ...) => ...,
                            >;
                        },
                        Record<never, never>,
                        ScreenHandle,
                        "required",
                    >,

                        | IgApiError
                        | RequestError
                        | ParseError
                        | TransportError
                        | InvalidSkipOrdinalsError
                        | ScreenDataError
                        | ScreenEnterNavigationError
                        | ScreenEnterConcurrentError
                        | ScreenNotOnTopError
                        | DirectThreadNotCreatedError
                        | ScreenEdgeInputError,
                >,
            >;
            sendMessage: (
                self: ScreenHandle,
                state:
                    | {
                        is_group: boolean;
                        kind: "thread";
                        peer_user_id?: string;
                        send_attribution?: string;
                        thread_id: string;
                        thread_title: string;
                        thread_v2_id: string;
                    }
                    | {
                        kind: "compose";
                        recipient_user_id: string;
                        send_attribution?: string;
                    },
            ) => (
                ...args: [text: string],
            ) => Effect<
                DirectThreadSentMessage,
                | IgApiError
                | RequestError
                | ParseError
                | TransportError
                | ScreenEnterConcurrentError
                | ScreenNotOnTopError,
                | PlainJsonApiHttp
                | Signature
                | MobileDevice
                | GraphqlJsonHttp
                | MobileApplication
                | NavigationWire
                | MobileNavigation
                | ScreenStack,
            >;
        },
        {
            media: {
                at: "media";
                by: "media_type";
                key: "pk";
                variants: {
                    "1": ScreenItemDefinition<
                        "DirectPhoto",
                        {
                            height: number;
                            media_type: 1;
                            pk: string;
                            url: string;
                            width: number;
                        },
                        {
                            height: number;
                            media_type: 1;
                            pk: string;
                            url: string;
                            width: number;
                        },
                        Record<never, never>,
                        never,
                        never,
                        {},
                    >;
                    "2": ScreenItemDefinition<
                        "DirectVideo",
                        {
                            height: number;
                            media_type: 2;
                            pk: string;
                            url: string;
                            width: number;
                        },
                        {
                            height: number;
                            media_type: 2;
                            pk: string;
                            url: string;
                            width: number;
                        },
                        Record<never, never>,
                        never,
                        never,
                        {},
                    >;
                    "8": ScreenItemDefinition<
                        "DirectCarousel",
                        {
                            media_type: 8;
                            pk: string;
                            slides: readonly { media_type: 1
                            | 2; pk: string; url: string }[];
                        },
                        {
                            media_type: 8;
                            pk: string;
                            slides: readonly { media_type: 1
                            | 2; pk: string; url: string }[];
                        },
                        Record<never, never>,
                        never,
                        never,
                        {},
                    >;
                };
            };
            messages: {
                at: "messages";
                item: ScreenItemDefinition<
                    "DirectThreadMessage",
                    {
                        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;
                    },
                    {
                        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;
                    },
                    DirectThreadMessageState,
                    never,
                    never,
                    {
                        react: (
                            self: ScreenHandle,
                            state: DirectThreadMessageState,
                        ) => (
                            ...args: [reaction: "like"],
                        ) => Effect<
                            DirectBroadcastResponse,
                            | IgApiError
                            | RequestError
                            | ParseError
                            | TransportError
                            | ScreenEnterConcurrentError
                            | ScreenNotOnTopError,
                            | PlainJsonApiHttp
                            | Signature
                            | MobileDevice
                            | NavigationWire
                            | MobileNavigation
                            | ScreenStack,
                        >;
                    },
                >;
                key: "item_id";
            };
            participants: {
                at: "users";
                item: ScreenItemDefinition<
                    "DirectThreadParticipant",
                    {
                        full_name: string;
                        pk: string;
                        thread_v2_id: string;
                        username: string;
                    },
                    {
                        full_name: string;
                        pk: string;
                        thread_v2_id: string;
                        username: string;
                    },
                    DirectThreadParticipantState,
                    never,
                    never,
                    {
                        openNicknameEditor: (
                            self: ScreenHandle,
                            state: DirectThreadParticipantState,
                        ) => ScreenEdgeBound<
                            ScreenEdgeShape<
                                ScreenDefinition<
                                    "DirectThreadNicknameChange",
                                    "screen",
                                    { thread_v2_id: string; user_id: string },
                                    { thread_v2_id: string; user_id: string },
                                    { thread_v2_id: string; user_id: string },

                                        | InvalidSkipOrdinalsError
                                        | ScreenEnterNavigationError
                                        | DirectThreadNotCreatedError,
                                    MobileNavigation,
                                    { changeNickname: (self: ..., state: ...) => ... },
                                    Record<never, never>,
                                    never,
                                >,
                                [],
                            >,
                            (
                                ...args: [],
                            ) => Effect<
                                AssembledHandle<
                                    "DirectThreadNicknameChange",
                                    "screen",
                                    { thread_v2_id: ...; user_id: ... },
                                    { changeNickname: ... },
                                    Record<(...), (...)>,
                                    ScreenHandle,
                                    "required",
                                >,

                                    | InvalidSkipOrdinalsError
                                    | ScreenDataError
                                    | ScreenEnterNavigationError
                                    | ScreenEnterConcurrentError
                                    | ScreenNotOnTopError
                                    | DirectThreadNotCreatedError
                                    | ScreenEdgeInputError,
                            >,
                        >;
                    },
                >;
                key: "pk";
            };
        },
        never,
    > = ...

    DirectThreadFragment:direct_thread, a conversation — or its composer.

    Two entries, a sum on the input:

    • an existing thread, opened from the inbox list (kind: 'thread'): the enter brings the thread to front, subscribes presence for the item's peers and loads the conversation; the recording carries the presence and not the thread GET (the inbox preview had the messages), but the library keeps no local message store, so the screen loads it itself (the recorded deviation).
    • 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 recorded order — and its answer decides the screen's state. A conversation that already exists (thread in the answer) is shown from that answer, and no presence is subscribed — the 1:1 recording's answer names a hidden earlier thread with no messages, and the app shows that empty conversation and subscribes nothing. No conversation yet (the compose form, no thread) is the composer: the screen comes to front, subscribes presence for the recipient and shows the person. The never-contacted case is not recorded: the 1:1 run's account had a deleted conversation the server still named, so the composer's own presence subscription, its recipient_users broadcast and its conversation fetch are the group-creation shapes, and a run against an account with no conversation at all closes them.

    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 entry carries the thread context its action sends. A composer has no thread id, so the details hub, Customize chat and the nickname editor are refused there (DirectThreadNotCreatedError and the sub-screens' own refusal); it shows no messages, so it has no reaction to offer.

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