Reputation: 318
I am trying to use the enrichment feature with an existing app.
When reading an (aggregated) feed from the client using a user_session I get a response:
{
"results": [
{
"activities": [
{
"actor": "User:67",
"foreign_id": "Saving:d6",
"id": "f1",
"object": "Item:23",
"origin": "activities:57",
"target": "List:82",
"time": "2018-11-15T09:29:25.291000",
"verb": "save"
}
],
...
Now, I would like to have the 67th User data embed in the response, using the enrichment feature. I tried, using the ruby framework:
STREAM_CLIENT.collections.upsert('User', [{id: '67', first_name: 'John', last_name: 'Doe'}])
However, reading the feed again, the response json does not contain my user data.
What am I doing wrong ?
Upvotes: 1
Views: 63
Reputation: 3271
The references that are part of the activity are not the correct format. You should use client.collections.createUserReference
like described here: https://getstream.io/docs/#frontend_backend_references
Upvotes: 1