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 prob开发者_开发知识库lem 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?
At present, the way to prevent this is to post two separate actions:
- yourapp:competing - "will compete in..." (same text for present and past tense)
- yourapp:competed - "competed in..." (same text for present and past tense)
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.
精彩评论