Adding notifications integration.
Fixing some PHP warnings when discussions are saved.