Logic handling interaction with messaging UI.