Hey Fidel,
For the duplicate message issue, I believe there is a conflict with the Cometchat component.
There are others who faced this issue in the past. They have consulted Cometchat but I'm not sure if this has been addressed on their end.
Perhaps you can consult them regarding this? You could be missing some fixes from them as well as I noticed you are still using an older version of Cometchat.