Skip to content

ThreadService

Chatto exposes this service below /api/connect.

Shared message and enum definitions are documented in Shared Types And Enums.

Manages thread follow state for the current user.

Returns followed threads for the current user, including enough root-message data for clients to render the list without extra per-field fetches.

POST /api/connect/chatto.api.v1.ThreadService/ListFollowedThreads

Request for a page of followed threads for the current user.

FieldTypeDescription
pagePageRequestPage request. Defaults to 20 results when absent or limit is zero.

Response containing one followed-thread page.

FieldTypeDescription
threadsrepeated FollowedThreadFollowed threads in newest-activity-first order.
includesRoomTimelineIncludesHot-path related entities needed to render this feed page without per-thread hydration.
pagePageInfoPage metadata.

Follows a thread for the current user. Followed threads can be surfaced in clients and can participate in thread notification behavior.

POST /api/connect/chatto.api.v1.ThreadService/FollowThread

Request to follow one message thread.

FieldTypeDescription
room_idstringRequired. Room containing the thread.
thread_root_event_idstringRequired. Event ID of the root message for the thread.

Result of following a thread.

FieldTypeDescription
followingboolTrue when the current user follows the thread after the operation.
stateThreadFollowStateCurrent follow state after the operation.

Stops following a thread for the current user. The response reports the resulting follow state so clients can update local UI immediately.

POST /api/connect/chatto.api.v1.ThreadService/UnfollowThread

Request to stop following one message thread.

FieldTypeDescription
room_idstringRequired. Room containing the thread.
thread_root_event_idstringRequired. Event ID of the root message for the thread.

Result of unfollowing a thread.

FieldTypeDescription
followingboolTrue when the current user follows the thread after the operation.
stateThreadFollowStateCurrent follow state after the operation.

Returns one page of events in a message thread. Initial pages include the thread root message; cursor pages return replies in the requested direction.

POST /api/connect/chatto.api.v1.ThreadService/GetThreadEvents

Request for a page of events in one thread.

Omit the cursor to load the latest visible part of the thread, including the root message. Set before to a previously returned start_cursor to page toward older replies, or after to a previously returned end_cursor to page toward newer replies without repeating the root message.

FieldTypeDescription
room_idstringRequired. Room containing the thread.
thread_root_event_idstringRequired. Event ID of the root message for the thread.
limitint32Maximum number of events to return. The server may clamp very large limits.
cursor.beforestringReturn thread events older than this opaque cursor.
cursor.afterstringReturn thread events newer than this opaque cursor.

Response containing one thread timeline page.

FieldTypeDescription
pageRoomTimelinePageLoaded timeline page.

Returns a thread timeline window centered around a specific event. Use this to open a reply from a notification or search result in context. Returns NOT_FOUND when the thread root or anchor event is missing or hidden and PERMISSION_DENIED when the room is inaccessible.

POST /api/connect/chatto.api.v1.ThreadService/GetThreadEventsAround

Request for thread events around a specific event.

Use this when a client needs to jump to a known reply and render surrounding thread context.

FieldTypeDescription
room_idstringRequired. Room containing the thread.
thread_root_event_idstringRequired. Event ID of the root message for the thread.
event_idstringRequired. Anchor event ID inside the thread. The event should belong to the requested thread.
limitint32Maximum number of events to return around the anchor.

Response containing a thread timeline window around a specific event.

FieldTypeDescription
pageRoomTimelinePageLoaded timeline page.
target_indexint32Zero-based index of the anchor event within page.events.

Marks a thread timeline as read through the supplied event without changing the room-level read marker.

POST /api/connect/chatto.api.v1.ThreadService/MarkThreadAsRead

Request to mark a message thread as read.

FieldTypeDescription
room_idstringRequired. Room containing the thread.
thread_root_event_idstringRequired. Event ID of the root message for the thread.
up_to_event_idstringHighest thread event ID the current user has read. The event should belong to the thread identified by thread_root_event_id.

Result of marking a message thread as read.

FieldTypeDescription
previous_read_atgoogle.protobuf.TimestampPrevious thread read timestamp, when one existed.