GetStream / stream-js

JS / Browser Client - Build Activity Feeds & Streams with GetStream.io
https://getstream.io
BSD 3-Clause "New" or "Revised" License
329 stars 110 forks source link

Enriched Reactions not Enriching #603

Closed AnnikaChauhan closed 6 months ago

AnnikaChauhan commented 6 months ago

I'm trying to create a new custom field on the data field in reactions to store the mentioned users in a reaction. I am well aware there is the 'to' field however this is specific to notifications only and does not store or get the rest of the information I need.

As per this issue - I have implemented client.user(userId).ref().

This is my code: client.reactions.add( 'reply', parentId: activityId, { content: "body of reaction", mentioned: [client.user(userId).ref()] }, { userId: reactionAuthorUserId } );

Below is the API response to client.reactions.get(reactionId). As you can see, the 'user' is enriching - however the 'mentioned' is not despite it knowing it is a user reference.

{ "created_at": "2024-03-12T11:00:48.637264Z", "updated_at": "2024-03-12T11:00:48.637264Z", "id": "ed69ddd3-fc5b-44e0-9593-1d95fb583e38", "user_id": "myUUID", "user": { "created_at": "2023-08-22T11:56:10.585365Z", "updated_at": "2024-03-07T14:35:17.235020Z", "id": "myUUID", "data": { "jobTitle": "Engineer", "name": "Annika", "organization": "organization", } }, "kind": "reply", "activity_id": "7a7d0590-dc8c-11ee-8080-80014ebc9a3e", "data": { "content": "comment 1", "mentioned": [ "SU:myUUID" ] } }

Please can someone assist? I am open to other methods of storing mention data if more suitable.

Using version: 8.3.1

AnnikaChauhan commented 6 months ago

Marking as closed. This issue was resolved by reaching out to support to enable custom enrichment on the reaction data.