-----Function-----
- Update chat function
- Update UI