RIM applies for patent on detecting emotion in messaging