Properly handle marking messages read from notifications.

I removed the timing variable since that isn't used anywhere anyway and replaced it with a messageid variable.