Toloka documentation

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

Parameters Type Description
id Optional[str]

Message thread ID.

topic Optional[Dict[str, str]]

Message thread title.

interlocutors_inlined Optional[bool]

Access information about the sender and recipients.

  • True - information is available in the field interlocutors.
  • False - information is available on a separate request.

interlocutors Optional[List[Interlocutor]]

Information about the sender and recipients, sorted by IDs.

messages_inlined Optional[bool]

Access to message threads:

  • True — The message is available in the messages field.
  • False — The message is available in a separate request.

messages Optional[List[Message]]

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

meta Optional[Meta]

Meta

answerable Optional[bool]

Ability to reply to a message:

  • True — The performer can respond to the message.
  • False — The performer cannot respond to the message.

folders Optional[List[Folder]]

Folders where the thread is located.

compose_details Optional[ComposeDetails]

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

created Optional[datetime]

The date the first message in the chain was created.