saving the just joined chat in the db