Optimize an if statement

Optimized the if statment in postSend() method in default case