Add rich chat API
Upstream merge
Add two spgiot patch files
Merge upstream