modify the function of the chatroom button