【发布时间】:2019-08-22 04:09:58
【问题描述】:
我正在使用 getstream 的 js/node api,我正在尝试向活动的 cmets 添加实时功能,但我收到 403 错误,显示我没有权限。
我尝试过使用 targetFeeds: '[timeline:userid]' 但它破坏了应用程序。
我还尝试在使用文档时使用通知提要,我可以像这样设置 targetFeeds:'[notification:userid]' 这显然不是我们想要做的,因为这会导致每条消息该用户的不同活动将显示在回调中。
client.reactions.add("comment", activityId, {
"text": newComment,
"profileImage": 'https://i.pravatar.cc/300',
"timestamp": date,
"from": userId,
"id": foreignId,
},
{targetFeeds: [`CommentsFeed:${activityId}`]});
而403的响应是下一个:
{
code: 17
detail: "You don't have permission to do this"
duration: "0.18ms"
exception: "NotAllowedException"
status_code: 403
}
预期的结果是没有 403,这将触发我实现的回调。
【问题讨论】: