Layer 227
constructor
inputMessageReadMetric#402b4495 msg_id:int view_id:long time_in_view_ms:int active_time_in_view_ms:int height_to_viewport_ratio_permille:int seen_range_ratio_permille:int = InputMessageReadMetric;

Parameters

Name Type Description
MsgId int ID of the message
ViewId long Random non-zero 64-bit ID generated for this exposure
TimeInViewMs int Total exposure time in milliseconds of at least one pixel of the message, after the 300 ms entry grace period
ActiveTimeInViewMs int Part of time_in_view_ms accumulated while the user is active
HeightToViewportRatioPermille int round(max_message_height * 1000 / max_viewport_height), may exceed 1000 when the message is taller than the viewport
SeenRangeRatioPermille int round(max_seen_vertical_range * 1000 / max_message_height), clamped to the 0–1000 range

Gogram Example

// Creating InputMessageReadMetricObj constructor
obj := &tg.InputMessageReadMetricObj{
    MsgId: 42,
    ViewId: int64(1234567890),
    TimeInViewMs: 42,
    ActiveTimeInViewMs: 42,
    HeightToViewportRatioPermille: 42,
    SeenRangeRatioPermille: 42,
}