The move comes after Trump threatened to withhold federal funds from New York City if Mamdani was elected.