Home

Awesome

Friend Chat

Friend Chat is a chat integration platform for Friend. It is built to make it fairly straightforward to add access to 3rd party chat APIs. It is a client - server architecture where the server handles the connection to the remote API and presents the content to the client. Multiple clients can be connected per account, all staying in sync. Accounts are created and logged in through Friend, no extra setup required.

Video / Audio Conferencing, aka Live

Friend Chat allows peer to peer video and audio calls over webRTC, supported by the presence service. The limits to number of participants is practical; the bandwidth and power of your device. The live sessions have several modes, available through the live view menu.

Invites

Live invites can be sent through any module. It is sent as a data string, and as long as the invitee is also using Friend Chat, it will be intercepted and presented to the user. The live session is then established over the presence service.

Guests

Any live session can be shared through a clickable link. This is a public invite and can be used by any number of people until it is explicitly canceled. People using this link will join as a guest with either a randomly generated name or one they choose themselves.

Share your screen or app

Screen-sharing is available for chrome through an extension. The option is found in the live view menu, and will either prompt you install the extension or offer to initiate screen sharing.

Streaming / Classrooms

Enableing streaming changes a room from supporting peer to peer sessions to selecting a single source and distributing this users stream to everyone else. While still using webRTC, a proxy server is used to distribute the stream, so the source only needs to send once. For this setting to be available Presence configuration must point to a third party service, Janus conferencing bridge. Janus must be set up separately.

Modules

Modules allow integration with 3rd party chat services. They have a server part that communicates with the remote service/server and a client part with a custom UI that presents the data. Current modules are IRC, Presence and Treeroot. Presence is always there and IRC is added by default.

IRC

Internet Relay Chat, because it would be weird not to have it. Covers most basic needs and commands. An abbreviated list of commands if you are new to IRC:

This can also be changed in settings. More commands and how irc works in general can be found on the internet.

Presence

Presence provides temporary or persistent many-to-many rooms for chatting and video / audio conferencing. Invites to presence rooms can be sent through the other modules. More info in the FriendSoftwareLabs/presence repository!

Treeroot

The Treeroot module integrates the chat part of the Treeroot system. It provides one to one chat, optionally end to end encrypted. You'll need to add the module ( 'add chat account' in the menu ) then log in with ( or create a new ) Treeroot account.

Setup

Requirements

How to install Friend Chat?

Go to the directory where you cloned Friend Chat from GIT. Run './install.sh' and answer the questions. The installation script will gather as much data from the Friend Core installation as it can, and will show as many pre-filled value as it can. You can restart this script at any time, after pulling changes from GIT for example.

Launching Friend Chat and Presence servers

The installation script automatically adds systemd service files.

To start:

To enable automatic start:

To view logs in case of problems:

Accessing Friend Chat application from the Workspace

After installing Friend Chat and its servers, and restarting Friend Core (sudo systemctl restart friendcore), you will have to install the Friend Chat application in your Friend machine. In the Workspace menu, choose the 'Tools / Software' option, locate Friend Chat in the list and click install. You will then find the Friend Chat icon in the 'System:Software/Internet' folder. The Friend Chat client has been localized in English and French.

Friend Chat depends on the user existing in Friend and calls Friend Core to authenticate them when they log in.

Upon launch, Friend Chat will be in the friendly UI mode, whith presence represented as 'Conference rooms', and Treeroot as 'Contacts'. You will be asked to create a Treeroot account ( its a third party service ). Conference rooms do not depend on Treeroot.

Developers

If you intend to work on the source code of the Friend Chat client application, the Friend Chat server or the Presence server, please read the following.

Friend Chat client

You will find the sourcecode of the Friend Chat client application in the 'client' folder of the friendchat directory. To test your modifications, run the updateAll.sh script : it will copy the modified files to the Friend build/resources/webclient/apps/FriendChat directory. Please note that after updating the files, in order for the new files to be used by Friend Core, you will have to clear the cache by using the Workspace menu option 'System / Clear cache'. Another alternative is to stop Friend Core, update the files, and restart Friend Core.

Friend Chat server

You will find the sourcecode of the Friend Chat server in the 'server' folder of the friendchat directory. As for the client, you will need to run the updateAll.sh script to copy the modified files in the Friend build/services/FriendChat folder. updateAll.sh also calls npm install automatically to update the node.js modules used by the Friend Chat server : if you copy the files manually, do not forget to do a npm install afterward. The server will be automatically stopped and restarted by the script.

Presence server

The Friend Chat installation script clones the Presence server directly into the Friend build/services/Presence directory. If you intend to work on it, we suggest that you clone the server in another more accessible directory. The Presence server can be found on Github. You can update the files by using its own update.sh script, which will copy the modifications to their proper location and run npm install automatically. The server will be automatically stopped and restarted by the script.

Branches

The purpose here is to keep master git log as a useful history, for things like writing patch notes and checking up on what was added when by who.

Version, x.y.z

License

FriendChat is licenced under AGPL3