Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,18 @@ url: "{{base_url}}/{{namespace}}/chat-channels/available-participants"
method: GET
queryParams:
channel: "{{chat_channel_id}}"
scripts:
- type: afterResponse
code: |
// Send Message, Add Participant and Create Read Receipt all address a user
// by {{user_id}}, which nothing set — they failed with "Sender of chat
// message not found" and "User to add as participant not found". This
// endpoint already returns the users eligible to participate, so take the
// first one rather than seeding a second fixture.
var json_response = pm.response.json();
let cv = pm.environment;
if (Array.isArray(json_response) && json_response.length) {
cv.set("user_id", json_response[0].id);
}
language: text/javascript
order: 1000
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ body:
{
"content": "Example comment",
"subject": {
"id": "{{organization_id}}",
"type": "company"
"id": "{{file_id}}",
"type": "file"
}
}

Expand Down
Loading