Craig Andrews wrote:
I bet someone will add the functionality at some point (I might).
Contributors are very much welcome, so if this feature is important to
you, please do grab the code and add it. We'll be more than happy (dare I
say ecstatic?) to receive a patch :-)
Hi,

Peter asked me to look into adding it. So I did.

We're still testing, but it's mostly tweaking remaining.
Right now it's half plugin/half core modification, and I don't really know yet if it should be a plugin or a built-in feature. It needs a few more events to be a plugin and I couldn't quite figure out how and where to add those for a feed.

Either way, currently we have an activitystream that contains;
- posting notices (post)
- subscribing to user (follow)
- favor a notice (favorite)
- joining a group (join)
- opening a single notice to view (play)

Also extending the current activitystream standard we have deleting a notice, unsubscribe user, disfavor notice, and leaving a group.

I left tags and replies as they where in the orginal atom feed and added the activitystream file object-type for attachments.

To be able to handle negative actions I added the table activitylog with type of activity in a varchar, par1 and par2 as integers pointing to the object the action works on, an activity date and a flag saying if the action is adding or deleting. Par1 could be renamed actor since that's what it is, par2 is the object.

I wrote a script to fill in missing data to that table from the notice, subscription, fave and group_members tables. There's a currently a plugin that keeps the activitylog table updated, it listens on these events: onEndNoticeSave, onEndNoticeDelete, onFavorNotice,onDisfavorNotice, onSubscribeUser, onUnsubscribeUser, onJoinGroup, onLeaveGroup, onShowNotice.
Those paying attention will notice I had to add many of those. :)

I have one configuration setting mostly for testing, to control if the cache table should be used, or if the data should come directly from the four tables involved. I don't think using the raw data is viable, partly because of performance issues, but mostly because that method doesn't handle negative actions nor play.

MvH,

_______________________________________________
StatusNet-dev mailing list
[email protected]
http://lists.status.net/mailman/listinfo/statusnet-dev

Reply via email to