Disable river when group is created and when a user joint a group

I everyone,

I don't want river to be created in the following cases:

  • When a group is created
  • When a user joint a group

How can I implement this ?

 

Best regard