Buddypress Group activity stream codex, add a custom activity

I'm developinging a plugin which auto suggests some groups and (auto joins users on 'wpmu_activate_user' and 'xprofile_updated_profile' to some groups ) based on their xprofile. How to add this custom 'auto-join' activity message to the activity stream of the group/s in question?