Modified PublishMsgViewController.m.