Modified chat functionality to accommodate updated data format ("from" changed to "un" and "fromID" changed to "uid").