GetStream/stream-php

Add child reaction fail with {"detail":"Error parsing 'target_feeds'","status_code":400,"code":4,"exception":"InputException","exception_fields":{"ta (truncated...)

Closed this issue · 2 comments

Steps to reproduce
Add child reaction with target_feed array parameter.

Current Behavior
When i am adding child reaction with target_feed, it returns this error. That i think, in the addChild function which is converting target_feed array to comma separated string. Like this
if( $targetFeeds !== null ){
$payload['target_feeds'] = join(',', $targetFeeds);
}
if i change to this
$payload['target_feeds'] = $targetFeeds;
It is working fine.

The target_feeds param should be an array and not a comma separated list of feed ids. Can you print_r $targetFeeds and add it here?

pterk commented

@MudassarSandhu thanks for reporting this and providing the fix. I've update the offending line and published a new release.