messaging modal functionality