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

    Variable MediaCommentsScreenConst

    MediaCommentsScreen: ScreenDefinition<
        "MediaComments",
        "screen",
        | {
            carousel?: { children: readonly string[]; slide: number };
            chainingSeedMediaId?: string;
            commentSessionId?: string;
            feedPosition?: string | number;
            mediaId: string;
            rankingSessionId?: string;
            surface: "feed";
        }
        | {
            chainingPosition?: string
            | number;
            chainingSeedMediaId?: string;
            chainingSessionId?: string;
            clientPosition?: string | number;
            commentSessionId?: string;
            mediaId: string;
            rankingSessionId?: string;
            storyRankingToken?: string;
            surface: "reels";
        },
        | {
            commentSessionId: string;
            createdMediaNoteIds: readonly string[];
            mediaId: string;
            slide?: { index: number; mediaId: string };
            surface: "feed";
        }
        | {
            commentSessionId: string;
            createdMediaNoteIds: readonly string[];
            mediaId: string;
            surface: "reels";
        },
        | {
            carousel?: { children: readonly string[]; slide: number };
            chainingSeedMediaId?: string;
            commentSessionId?: string;
            feedPosition?: string | number;
            mediaId: string;
            rankingSessionId?: string;
            surface: "feed";
        } & {
            commentSessionId: string;
            createdMediaNoteIds: readonly string[];
            mediaId: string;
            slide?: { index: number; mediaId: string };
            surface: "feed";
        }
        | never
        | never
        | {
            chainingPosition?: string
            | number;
            chainingSeedMediaId?: string;
            chainingSessionId?: string;
            clientPosition?: string | number;
            commentSessionId?: string;
            mediaId: string;
            rankingSessionId?: string;
            storyRankingToken?: string;
            surface: "reels";
        } & {
            commentSessionId: string;
            createdMediaNoteIds: readonly string[];
            mediaId: string;
            surface: "reels";
        },
        IgApiError
        | RequestError
        | ParseError
        | TransportError
        | ScreenDataError,

            | PlainJsonApiHttp
            | MobileSession
            | MobileDevice
            | GraphqlJsonHttp
            | MobileApplication
            | MobileNavigation
            | JsonResponseHttp
            | MobileUserFlows
            | MediaCommentsReads
            | AndroidQuickPromotionStash,
        {
            comment: (
                self: ScreenHandle,
                state:
                    | {
                        carousel?: { children: readonly string[]; slide: number };
                        chainingSeedMediaId?: string;
                        commentSessionId?: string;
                        feedPosition?: string | number;
                        mediaId: string;
                        rankingSessionId?: string;
                        surface: "feed";
                    } & {
                        commentSessionId: string;
                        createdMediaNoteIds: readonly string[];
                        mediaId: string;
                        slide?: { index: number; mediaId: string };
                        surface: "feed";
                    }
                    | never
                    | never
                    | {
                        chainingPosition?: string
                        | number;
                        chainingSeedMediaId?: string;
                        chainingSessionId?: string;
                        clientPosition?: string | number;
                        commentSessionId?: string;
                        mediaId: string;
                        rankingSessionId?: string;
                        storyRankingToken?: string;
                        surface: "reels";
                    } & {
                        commentSessionId: string;
                        createdMediaNoteIds: readonly string[];
                        mediaId: string;
                        surface: "reels";
                    },
            ) => (
                ...args: [text: string, options?: CommentOptions],
            ) => Effect<
                MediaCommentResponse & { raw: ActionRaw },

                    | IgApiError
                    | RequestError
                    | ParseError
                    | TransportError
                    | ScreenEnterConcurrentError,
                | PlainJsonApiHttp
                | Signature
                | MobileSession
                | MobileDevice
                | MobileApplication
                | NavigationWire
                | MobileNavigation
                | MobileUserFlows
                | ScreenStack,
            >;
        },
        Record<never, never>,
        never,
        "mediaId",
    > = ...

    CommentListBottomsheetFragment:comments_v2, the comment sheet (the 450 build spells the class CommentListBottomsheetComposeFragment; the catalog holds the per-build class table).

    Visible: the media's comments and the composer, opened over the media it belongs to; the body and the client endpoint name the surface it sits over.

    Reached from: a post (PostOpenedFromLink.openComments) or a reel (ReelsViewer.openComments), source button.

    Requests: its enter sends the sheet's opening page (GET api/v1/media/<id>/stream_comments/, the 451 app's parameter set) before it comes to front — the app reports the screen under it as the endpoint — and reads no answer of it (the Simulator has met no decodable one). Over a carousel post whose children the surface below passed (input.carousel), the page names the slide in front — carousel_media_id, carousel_index (and the literal carousel_size=null the app always sends) — derived from the children and the slide the person swiped to (slideInFront), never supplied by a caller, from the grid answer (the posts feed) or the media info answer (the post screen); then it comes to front, fires the sheet's quick-promotion slot (COMMENT_THREAD) and, when no surface of the slot has a fresh answer in the process's stash, sends the slot's QuickPromotionSurfaceQueryV3 batch — one per process within the stash's two-hour window, so the second open of a sheet sends none. The slot's screen-load trigger flows run while the batch is in flight and end at its answer, as every slot's do. Around it the sheet sends the rest of its open burst (media.comments.requests.ts): while the surface below is still in front the author's limited comments (only over the viewer's own media), the single-media shop eligibility and the restricted accounts, and once the sheet is in front its content-appreciation query. The answers are decoded by nothing (the sheet shows no comments), so no answer is read.

    Actions: comment(text) is the app's composer: the offensive-comment check (media/comment/check_offensive_comment/) with the composer's session id, then the comment itself (media/<id>/comment/) in the body variant of the surface this sheet was opened over. options.commentCreationKey is the per-comment idempotence key the app carries (generated when absent; a retry with the same key deduplicates the comment). The feed body names the notes the composer showed — what the library knows of them is the ids this process created for the media, read on enter from the process's note state (the composer's full set would come from stream_comments, which is not modelled). The feed body's ranking_session_id is the session the surface below opened the sheet with, when that surface records one: the 451 contextual feed's edge declares it, the 450 short-url post's sends none (the empty value). The sheet's module — and so the body's container_module — is the surface below it, from the navigation.

    The comment is the Android 450 app's, sent from a post and from the reels viewer.

    The comments sheet

    Guide: Likes, reposts and comments