updated chat snippets to handle subscriptions