Dialog Model

Property name

Type

Description

_id

string

ID of the dialog. Generated automatically by the server after dialog creation.

user_id

int

ID of dialog's owner.

created_at

datetime

Date & time when a record was created, filled automatically.

updated_at

datetime

Date & time when a record was updated, filled automatically.

type

int

Type of dialog. Possible values are:
type=1 (PUBLIC_GROUP)
type=2 (GROUP)
type=3 (PRIVATE)

name

string

Name of a group chat. Makes sense if type=1 (PUBLIC_GROUP) or type=2 (GROUP). The maximum length for the dialog name is 200 symbols.

photo

string

Photo of a group chat. Makes sense if type=1 (PUBLIC_GROUP) or type=2 (GROUP).
Can contain a link to a file in Content module, Custom Objects module or just a web link.

xmpp_room_jid

string

JID of XMPP room for group chat to connect. Nil if type=3 (PRIVATE). Generated automatically by the server after dialog creation.

occupants_ids[]

array of int

Array of users' IDs - dialog occupants. Does not make sense if type=1 (PUBLIC_GROUP).

last_message

string

Last sent message in this dialog.

last_message_date_sent

timestamp

Timestamp of last sent message in this dialog.

last_message_user_id

int

ID of the user who sent last message in this dialog.

unread_messages_count

int

Number of unread messages in this dialog for a current user.

data

object

- Information about class and fields in Custom Objects.
- Any dialog can be extended using Custom Objects to store additional parameters.

data.class_name

string

Class name in Custom Objects.

data.{field_name_N}

string

Field name of class in Custom Objects. Can be many: 1..N.