yoooo hey confused italian learners, the "di" is there when it isn't a direct quote. They could have given a looooooooong winding answer, but instead of quoting them exactly, you could add "di" to emphasize that though their answer was no, that wasn't their exact words. thats why the "lui dice ciao" dosn't have "di" because lui probably did just say "Ciao" hope that helps! Ciao ciao!
I love how Italian has almost the same rules as Romanian, it feels like cheating when learning it, you'd have the exact same context in Romanian applied here. But then I'm learning Italian using English and trying to translate phrases from English to Italian makes no sense...
As far as I could understand this "di" would replace a "que" in Spanish when using indirect speech: "Ellos dicen que si". They both allow the person who is communicating a message using reporting speech to summarise someone's answer in a simple statement, which details are either not relevant or not supposed to be disclosed.