post and get messages in chatroom