I should probably add the disclaimer that it's not recommended that users directly modify the db unless you know what you're doing.
That said, you might find this helpful: https://www.mysqltutorial.org/create-the-first-trigger-in-mysql.aspx/
easiest way i can think of would be to write a sql trigger for whenever a record of type 'group:join' is added to the
ossn_relationships table. basically you need to add a corresponding record to 'group:join:approve' - so you could just make an insert after trigger on that table.
but is there a way to leave when I publish without needing approvals?