- rejoice in others' action - mental approval
- partake in the activity
one accumulates common karma.
Also, being encouraged or not (sasañkhārikam / asañkhārikam) does matters. This reduces potency. In case of doing something as a group, not everyone will have the same motivation. If one is self-motivated karmic potential is high. If one loses motivation and seeds some self-encouragement it is lesser. If one needs external encouragement it will be even lesses.
If a group is taking some negative action. One should disassociate with the negative action and also not rejoice in that is being done. One should encourage others to disassociate. One should not encourage anyone to do what is negative.
If a group is taking some positive action. One should associate with the positive action and also rejoice in that is being done. One should encourage others to associate. If one's motivation lapses one should encourage oneself.
If one is a monk being suspected of doing wrong may discredit the institution/order of monks. So it best to be mindful of if this happens. For a layperson disassociating mentally is enough to prevent karmic repercussions, as karma is volition based, but wise even not to appear as associated as this will have social consequences.
Even if one does not have the means to participate or do a positive action if one mentally approved it then one partakes the merit. If one is indifferent or does not approve one does not get karmic results. Same is true for negative actions.