This whole thing seems pretty awkward to me. Maybe there’s an easier way to track the selection of different types of messages while still retaining their IDs for later deletion.