Abstract large code blocks in ChatRoomService

ACE-55