Adding a Chat Room to your Webapp

Provision Rocket.Chat Server

sudo snap install rocketchat-server

Authenticate User for Chat Room

Iframe Auth Settings in Accounts

Fast Load Chat Rooms?

X-Frame-Options settings in General to restrict iframe load
<iframe
src="http://localhost:3000/channel/general/?layout=embedded"
title="myframe"
></iframe>
Without using the event command technique, it takes time to switch bewteen channels
Iframe integration settings to enable receive event commands
<div onClick={() => {
document.getElementsByTagName(“iframe”)[0].contentWindow.postMessage(
{ externalCommand: "go", path: "/channel/Evening-Party/?layout=embedded" },
"http://localhost:3000"
);
}}> Evening Party </div>
Instant switching using the event command technique

Go try it out!

--

--

--

Engineering @ Gojek | Open source enthusiast and contributor @ Rocket.Chat and FOSSASIA

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Stack Overflow Developer Survey Exploration Results:

Is There Any Free Text To Voice Converter Available Online?

Types of Software Architecture Patterns

The Mentally Friendly Process Flow

The Easy Way To Read Files From Google Cloud Storage With Pandas or Dask

Step-by-Step Guide: Easily Add Music to Your Next Virtual Workshop, Lesson, or Meeting

All You Should Know about the Dedicated Team Model in QA

AWS S3 and Presigned URL

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Dhruv Jain

Dhruv Jain

Engineering @ Gojek | Open source enthusiast and contributor @ Rocket.Chat and FOSSASIA

More from Medium

Expert Guide — Top 10 Trending JavaScript Frameworks in 2022

Tabs Region JavaScript API in Oracle APEX

Express vs Koa

All about Git-Secret from scratch