How to add Custom module to My Activity Stream

I want updates in Tasks module to show up in Activity Stream just like contacts module. How can I achieve this? Which files should I edit?