Fix to use sender type for user id
Update user date when message received
Refactor removing unnecessary variables
Remove unnecesary local variable