Skip to content
This repository has been archived by the owner on Jun 30, 2022. It is now read-only.

How to use a custom build of livechat client #360

Open
hrmon opened this issue Jan 29, 2020 · 4 comments
Open

How to use a custom build of livechat client #360

hrmon opened this issue Jan 29, 2020 · 4 comments

Comments

@hrmon
Copy link

hrmon commented Jan 29, 2020

Hi
I have made some modifications to the source of this livechat client. Now I am wondering how can I integrate this modified version with my self-deployed Rocketchat server.

@hrmon
Copy link
Author

hrmon commented Mar 3, 2020

In my case I wanted to use livechat as a standalone app not a widget on a website. For anyone else who wants to the same thing, Here is the workaround I have found:

  • I make the modifications I want on this repository.
  • Use yarn build to create optimized build of the app.
  • The build directory is the content that I should serve by my web server, but needs some changes.
  • This directory contains an index.html file which is the start point of the app. It must be moved out of the directory.
  • In index.html the JS libraries are addressed from livechat/ directory, so rename build/ to livechat/. The file structure would be:
|- livechat/
|- index.html
  • Finally for the livechat app to connect to my RocketChat server, add the following to index.html
<script>
        window.SERVER_URL = "http://myrocketchatserver.com";
</script>

@renatobecker
Copy link
Contributor

Hi @hrmon

You wrote you don't want to use the livechat as a widget, so why didn't you use the https://your-server-url/livechat route that serves the livechat application? Isn't it the same behavior you are expecting?

Thanks.

@hrmon
Copy link
Author

hrmon commented Mar 4, 2020

Hi @renatobecker

I was aware of that route, but I needed to make some modifications and branding on the livechat app, which was beyond what I could do from administration panel. So I had to serve a custom build of the livechat app.

@renatobecker
Copy link
Contributor

Hi @renatobecker

I was aware of that route, but I needed to make some modifications and branding on the livechat app, which was beyond what I could do from administration panel. So I had to serve a custom build of the livechat app.

Okay, I got it, but why don't you think the modifications you did can't become native features?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants