实时提要反应 - getstream-io

Real-time feed Reactions - getstream-io

我正在使用 getstream.io 实现一个 facebook/linked-in 类提要。 Feed 结构如下:

I have two feed groups;
     1. user (flat feed)
     2. timeline (flat feed)

Every user has an own user feed(user:userId) and a timeline feed(timeline:userId). 
timeline:userId follows user:userId

当用户将 post 添加到 user:userId 时,相应的关注者会实时更新他们的 timeline:userId 供稿。那部分工作正常。

但是当用户对 post 做出反应(即喜欢)时,其他用户(在他们的时间线上有相同 post 的用户)不会得到关于该反应的任何实时更新.

那么我怎样才能使用 getstream.io 实现这个呢?

这是一个缺失的功能,目前正在实施中。

现在,在添加反应时,您可以添加 targetFeeds 属性,这将在其他列出的提要上创建一个 activity,引用正在创建的反应。它会触发实时更新,因为在某些提要上添加了 activity。在客户端,您可以处理此更新并根据需要忽略特殊的 activity。