时间轴过去和现在的动作“最近”聚合混合
我为对象“竞赛”设置设置了“已完成”操作:
- 过去:约翰·多伊完成了示例竞赛
- 当前:约翰·多伊将在今天参加示例竞赛
问题是当我为过去已完成的竞赛发布一个操作,然后发布当前比赛的动作。当它显示最近的活动时,它将两者混合在一起,假设我将示例当前比赛发布为当前比赛,并设置了 expires_in ,并将过去的比赛设置为 expires_in 未设置。
我会在我的个人资料中看到这一点:
John Doe 今天将参加当前比赛和过去比赛的示例。
或类似内容:
John Doe 今天将参加当前比赛示例以及另外 2 场比赛。
如果我发布了多场未出席的比赛。
您知道这有多糟糕,我如何防止这两者作为我的个人资料中的最近活动“混合”,我是否必须进行单独的操作并将其保留用于过去或现在的操作?
I have the Action "completed" for the Object "race" setup like this:
- Past: John Doe completed Example Race
- Present: John Doe will be competing today in Example Race
The problem is when I post an action for a past completed race and then post an action for a current race. It mixes the two when it shows recent activity, say I post Example Current Race as the present race with expires_in set, and Past Race with the expires_in not set.
I would get this in my profile:
John Doe will be competing today in Example Current Race, and Past Race.
or something like:
John Doe will be competing today in Example Current Race, and 2 other races.
if I posted multiple non-present races.
You get how this would be bad, how do I prevent these two from "mixing" as recent activities in my profile, do I have to make a separate action and just have it reserved for past or present actions?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
目前,防止这种情况的方法是发布两个单独的操作:
当用户当前正在参与某项活动时,发布第一个操作并存储您返回的操作 ID。当他们参加比赛后,删除第一个操作,然后发布第二个类型的另一个操作。
本质上,你是通过交换动作来强制改变时态。这也可以防止相同类型但不同时态的动作聚合在一起。
对事件的支持尚不理想——我们正在考虑这一点。
At present, the way to prevent this is to post two separate actions:
When a user is currently competing in something, post the first action and store the action ID you get back. When they've competed in the event, delete the first action, and post another action of the second type.
Essentially you're forcing a change in tense by swapping the actions. This also prevents actions of the same type, but different tense, being aggregated together.
Support for events is not yet ideal - something we're looking at.