I noticed that dispatch_unread_direct_messages_email was being sent a user instance when it expected a first name string, this would have worked but you would have had the strange thing of "<User object 'James'> just sent you a direct message" in the emails.
Also:
Make all arguments required (better to check with if x is None when you have optional kwargs, but in this case I didn't see a reason to keep the default of None as the work was better suited to be done near the places the dispatch methods were called)
I noticed that
dispatch_unread_direct_messages_email
was being sent a user instance when it expected a first name string, this would have worked but you would have had the strange thing of "<User object 'James'> just sent you a direct message" in the emails.Also:
if x is None
when you have optional kwargs, but in this case I didn't see a reason to keep the default of None as the work was better suited to be done near the places the dispatch methods were called)