Modify code for PublishMsgViewController.