In the following example, I am struggling to understand why we must use la and not lui? To me, it sounds like the sentence requires an indirect object pronoun, because the question "What" is not answered in response to the "must", which is the verb in this sentence. I use the "what" test to determine if there is a direct object in the sentence. With this sentence, should I consider "what must they warn" as my question, or "what must they do". Apologies if my line of thought is completely skewed but it seems to work in most cases.
Does Julie know? We must warn her ,
- Julie est au courant ? Il faut lui prévenir,- Julie est au courant ? Il faut la prévenir,