我需要发送一个活动(例如,活动,共享活动,评论活动等)到stream.io。有人可以帮我吗?以下是我想发送至stream.io
的LIKE活动的示例 _activityService.StoreUniqueActivity(new Activity
{
Actor = $"JunaUser:{userId}",
Verb = InteractionMetadata.INTERACTION_LIKE,
Object = $"{feedItem.ContentType}:{feedItem.Id}",
Time = DateTime.UtcNow.ToString("s", System.Globalization.CultureInfo.InvariantCulture)
});
if (feedItem.Interactions == null)
feedItem.Interactions = new InteractionMetadata
{
Likes = 0,
Shares = 0,
Pins = 0
};
feedItem.Interactions.Likes++;
_feedItemRepository.Upsert(feedItem);