Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escape special characters +-&|!(){}[]^"~*?:\ - e.g. \+ \* \!
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
Answered
Get Stream Id from Promise returned by StartRoom and SendMessage API through ECP

Hi,

We are using ECP(Embedded Collaboration Platform) in our application. We are trying to resolve the javascript promise sent by StartRoom,SendMessage and CreateRoom API.

https://docs.developers.symphony.com/embedded-modules/embedded-collaboration-platform/open-a-chat
https://docs.developers.symphony.com/embedded-modules/embedded-collaboration-platform/send-a-message
https://docs.developers.symphony.com/embedded-modules/embedded-collaboration-platform/create-a-room

How to retrieve the stream id from javascript promise response sent by the above API. Could anyone please help me with a simple example.

Context:

As a first step, we want to initiate a new chat between 2 users.
For the first time, we won't have streamId to openStream or startroom.
we want to capture the stream id that was created for the first time and sent as javascript Promise response for Startroom, SendMessage and CreateRoom API from Symphony.

  
  
Posted one year ago
Edited one year ago
Votes Newest

Answers 3


Thank you . Will try this. Is it same for the StartToom and SendMessage API.

  
  
Posted one year ago

Thnks for sharing

  
  
Posted one year ago

The ECP SDK returns a standard Javascript promise so you either use await or then() to retrieve the response, in which streamId is in the object root.

window.symphony.createRoom(
  'Room Name',
  [ 123456789, 123456788, 123456787 ],
  {},
  '.ecp-div'
).then((response) => console.log(response.streamId));
1
1
Posted one year ago
Yong Sheng Tan
39 × 2 Administrator
7K Views
3 Answers
one year ago
one year ago
Tags