Refactoring sendPushNotification

Reduce code of sendPushNotification.
Also add notification after a question has been viewed.