MessageThread

toloka.client.message_thread.MessageThread | Source code

MessageThread(
self,
*,
id: Optional[str] = None,
topic: Optional[Dict[str, str]] = None,
interlocutors_inlined: Optional[bool] = None,
interlocutors: Optional[List[Interlocutor]] = None,
messages_inlined: Optional[bool] = None,
messages: Optional[List[Message]] = None,
meta: Optional[Meta] = None,
answerable: Optional[bool] = None,
folders: Optional[List[Folder]] = None,
compose_details: Optional[ComposeDetails] = None,
created: Optional[datetime] = None
)

Message thread.

The sent message is added to the new message thread. Until the first response is received the message chain is in the folder UNREAD. If there are several addresses in the chain and one of them responds, a new message chain will be created

Parameters Description

ParametersTypeDescription
idOptional[str]

Message thread ID.

topicOptional[Dict[str, str]]

Message thread title.

interlocutors_inlinedOptional[bool]

Access information about the sender and recipients.

  • True — information is available in the field interlocutors.
  • False — information is available on a separate request.
interlocutorsOptional[List[Interlocutor]]

Information about the sender and recipients, sorted by IDs.

messages_inlinedOptional[bool]

Access to message threads:

  • True — The message is available in the messages field.
  • False — The message is available in a separate request.
messagesOptional[List[Message]]

Messages in the thread. Sorted by creation date (new first).

metaOptional[Meta]

Meta

answerableOptional[bool]

Ability to reply to a message:

  • True — The Toloker can respond to the message.
  • False — The Toloker cannot respond to the message.
foldersOptional[List[Folder]]

Folders where the thread is located.

compose_detailsOptional[ComposeDetails]

For messages that you sent: details of the POST request for creating the message.

createdOptional[datetime]

The date the first message in the chain was created.

Toloka-Kit
OverviewGetting OAuth tokenQuick start
Recipes
Reference
toloka.client
toloka.async_client
toloka.autoquality [autoquality]
toloka.metrics
toloka.streaming