I’m going to answer to the posted question without reading all of the commentary.
First, the answer should NOT be given in terms of electronegativity. I cannot go into detail here, but the failure of electronegativity theory to predict or explain that HI is a strong acid must not be ignored.
Acidity and basicity are properties of the electron pairs of an atom. We know that HF is tetrahedral so we know a proton is attached to an electron pair in HF. We should infer the electron pairs of a fluoride are also tetrahedral. That means we should judge the basicity of fluoride on the basis of each of its valence electrons and not on the basis of its net charge. No change has occurred to the charge of an electron pair.
If dissolving HCl in water gives hydronium ion and chloride ion, this should tell us the electron pairs of oxygen are more basic than an electron pair of a chloride ion. Again, these are properties of the electron pairs and not a property of the ions per se.
The above are consistent with the long bonds of NaCl and the ease at which the ions separate and easily dissolve in water. A theory of ionic attraction suggests they should form strong bonds. Long bonds belie a strong bond. Na(+) and Cl(-) each have completed octets and do not need to be attracted to the electrons of each other. That is different that the much shorter and stronger bonds of CH3Cl in which an electron pair must be shared. It is also consistent with the properties of sodium metal. Metallic sodium has one additional electron beyond its octet. In solution, it likes to donate this electron. Try adding sodium metal to water and see if this reaction is exothermic and spontaneous (everyone knows the answer).
This should tell us things we already know. If we remove a proton from the nucleus of oxygen, will the valence electrons become more or less basic? This should predict nitrogen and ammonia should be more basic than oxygen and water. We should anticipate HCl will form ammonium chloride with ammonia. The attraction of the ions should be low, each have completed octets. The electron pairs of chloride are not very basic which is why HCl is a strong acid. Water is not as acidic, so a mixture of ammonia in water may form some ammonium hydroxide, most does not. It will be hydrogen bonded, but the protons will mainly stay on the oxygen.
On electronegativity theory, I have talked about it at American Chemical Society meetings. Unfortunately, it is not good science although repeated in virtually every chemistry textbook. Acidity is virtually the gold standard to measure ionization. The failure of electronegativity theory to match acidity should have been a clue as to its validity. Electronegativity theory is a quasi scale of reactivity. Fluorine is very reactive and more reactive than chlorine, etc.
I have not updated this in some time, but search for electronegativity and curvedarrowpress and you can see slides of an old talk there. I am writing a manuscript in which I have a fuller explanation of the data Pauling used to advance electronegativity theory. That will explain why HI is a strong acid and why iodide is a good leaving group. The explanations are much like my discussion above.