Getstream.io的own_reactions如何工作?以为它将包含用户获取的反应

时间:2019-05-06 17:26:34

标签: getstream-io

Getstream.io的own_reactions存储所有反应,而不仅仅是用户获取的反应。我认为它可能包含用户获取活动的反应,甚至可能包含创建活动的用户自己的反应。

在文档中,似乎own_reactions将包含来自用户获取的响应:

"# read bob's timeline and include most recent reactions to all activities and her own reactions"

https://getstream.io/docs_rest/#reactions

但是关于此的其他信息并不多。 在此代码中,例如:

let feed = client.feed('user', 'alice', streamUserToken);    
let response = await feed.get({ limit: 30,  enrich: true, reactions: {"counts": true, "recent": true, "own": true} })

我希望只看到爱丽丝自己的反应,但是我得到了所有反应,无论它们来自谁...

1 个答案:

答案 0 :(得分:3)

阅读提要时必须指定user_id(即不同的用户可以阅读同一提要)

确保将user_id =“ alice”传递到feed.get

click here