Heat the oil in a saucepan and gently fry the onion, garlic and spices for 10 minutes until soft but not browned. Add the tomatoes, maple syrup, vinegar, chilli sauce and some salt and pepper and bring to the boil. Simmer gently for 10 minutes, stir in the chocolate until melted and leave to cool.
Transfer to a food processor or blender and blend until smooth. Use as required or store in an airtight container in the refrigerator for up to 1 week.