Lists all the channel's messages. Permissions required: view-c-room
, view-joined-room
Changelog
Version | Description |
---|---|
7.0.0 | Added mentionIds , starredIds , pinned query parameters. |
0.59.0 | Added |
The authToken
of the authenticated user.
The userId
of the authenticated user.
The room id.
List of fields to order by, and in which direction. This is a JSON object, with properties listed in desired order, with values of 1 for ascending, or -1 for descending. For example, {"value": -1, "_id": 1}. Refer to the official documentation to learn more.
Number of items to "skip" in the query, i.e. requests return count items, skipping the first offset items. Refer to the official documentation to learn more.
Filter the messages where a user has been mentioned by the userId. For a set of userIds, use an array (["838ndhd79w", "dud0wu900"]
).
Filter the messages a user have starred by userId. For a set of userIds, use an array (["838ndhd79w", "dud0wu900"]
).
Filter pinned messages.
OK
{
"messages": [
{
"_id": "uASTuwBEu7SBDAxxh",
"rid": "6513afeda2f73c7460e18c86",
"msg": "threaads produced links",
"ts": "2023-09-27T04:36:47.522Z",
"u": {
"_id": "rbAXPnMktTFbNpwtJ",
"username": "roxie",
"name": "test test"
},
"_updatedAt": "2023-09-27T04:36:47.698Z",
"urls": [],
"mentions": [],
"channels": [],
"md": [
{
"type": "PARAGRAPH",
"value": [
{
"type": "PLAIN_TEXT",
"value": "threaads produced links"
}
]
}
]
},
{
"_id": "B7Yms4bCvgJsitrBq",
"rid": "6513afeda2f73c7460e18c86",
"msg": "always do",
"ts": "2023-09-27T04:34:38.818Z",
"u": {
"_id": "rbAXPnMktTFbNpwtJ",
"username": "roxie",
"name": "test test"
},
"_updatedAt": "2023-09-27T04:34:38.900Z",
"urls": [],
"mentions": [],
"channels": [],
"md": [
{
"type": "PARAGRAPH",
"value": [
{
"type": "PLAIN_TEXT",
"value": "always do"
}
]
}
]
},
{
"_id": "3rfQYmS8MzCKnQbcu",
"rid": "6513afeda2f73c7460e18c86",
"msg": "",
"ts": "2023-09-27T04:34:34.259Z",
"u": {
"_id": "rbAXPnMktTFbNpwtJ",
"username": "roxie",
"name": "test test"
},
"_updatedAt": "2023-09-27T04:36:38.258Z",
"urls": [],
"mentions": [],
"channels": [],
"replies": [
"rbAXPnMktTFbNpwtJ"
],
"tcount": 0,
"tlm": "2023-09-27T04:34:50.746Z",
"attachments": [],
"editedAt": "2023-09-27T04:36:19.494Z",
"editedBy": {
"_id": "rbAXPnMktTFbNpwtJ",
"username": "roxie"
},
"reactions": {},
"t": "rm"
},
{
"_id": "6513b143a2f73c7460e18c88",
"rid": "6513afeda2f73c7460e18c86",
"msg": "test messages",
"ts": "2023-09-27T04:34:34.259Z",
"u": {
"_id": "rbAXPnMktTFbNpwtJ",
"username": "roxie",
"name": "test test"
},
"_updatedAt": "2023-09-27T04:36:19.486Z",
"urls": [],
"mentions": [],
"channels": [],
"md": [
{
"type": "PARAGRAPH",
"value": [
{
"type": "PLAIN_TEXT",
"value": "test messages"
}
]
}
],
"replies": [
"rbAXPnMktTFbNpwtJ"
],
"tcount": 1,
"tlm": "2023-09-27T04:34:50.746Z",
"_hidden": true,
"parent": "3rfQYmS8MzCKnQbcu",
"editedAt": "2023-09-27T04:36:19.485Z",
"editedBy": {
"_id": "rbAXPnMktTFbNpwtJ",
"username": "roxie"
}
}
],
"count": 4,
"offset": 0,
"total": 4,
"success": true
}
Unauthorized
{
"status": "error",
"message": "You must be logged in to do this."
}