Page: unichat subscription record
v.3 by Vyacheslav Metelkin
2019-08-08 14:08
2019-08-08 14:08
Subscription record include information about group and current user
rights and reading state for it. In full form it contains also <group record>
with participating users records:
{
"subscription": {
{
"id": 1958,
"group_id": 252,
"user_id": 1508,
"role": "rw",
"mute_until": null,
"draft": null,
"tags": null,
"last_read_message_id": null,
"created_at": "2018-10-16T18:03:27Z",
"group": {
"id": 252,
"name": null,
"is_deleted": false,
"is_space": false,
"created_at": "2018-10-16 18:03:27 UTC",
"updated_at": "2018-10-16 18:03:27 UTC",
"last_message_id": null,
"last_serial": null,
"strid": "p2p:1508:1509",
"type": "private_chat",
"participants": [
{
"id": 1958,
"group_id": 252,
"user_id": 1508,
"role": "rw",
"mute_until": null,
"draft": null,
"last_read_message_id": null,
"created_at": "2018-10-16T18:03:27Z",
"user": {
"id": 1508,
"nick": "test_user_2",
"is_online":true
}
},
{
"id": 1959,
"group_id": 252,
"user_id": 1509,
"role": "rw",
"mute_until": null,
"draft": null,
"last_read_message_id": null,
"created_at": "2018-10-16T18:03:27Z",
"user": {
"id": 1509,
"nick": "test_user_3",
"is_online":false
}
}
]
},
"user": {
"id": 1508,
"nick": "test_user_2"
}
}
]
}
in short form. group
object will not be included. It can be requireset
separately.
Note that tags
field if exists, contain array of strings. This field is shown
to the subscription owner only.