Coder Social home page Coder Social logo

gary-kim / riotchat Goto Github PK

View Code? Open in Web Editor NEW
123.0 8.0 21.0 3.71 MB

Element for Nextcloud

Home Page: https://apps.nextcloud.com/apps/riotchat

License: GNU Affero General Public License v3.0

Makefile 2.43% PHP 45.49% JavaScript 27.17% Vue 23.99% Shell 0.85% CSS 0.08%
nextcloud nextcloud-app matrix-org riot-web open-source free-software messaging hacktoberfest element-web

riotchat's Introduction

Element for Nextcloud

Build Status Matrix Room: #riotchatfornextcloud-general:garykim.dev GitHub Releases

Element for Nextcloud allows you to install Element easily through Nextcloud and join the Matrix decentralized communication network.

This app does not include a Matrix server, only the client. You will have to either set up your own Matrix homeserver, rent one, or use a public one.

This project is not affiliated, associated, authorized, endorsed by, or in any way officially connected with Element or the Element project, or any of its subsidiaries or its affiliates.

The name Element as well as related names, marks, emblems and images are registered trademarks of their respective owners.

The upstream project can be found at https://github.com/vector-im/riot-web.

Screenshot 2 Screenshot 3

If you want to join the discussion, join the Matrix community chat room here: https://matrix.to/#/#riotchatfornextcloud-general:garykim.dev. There is work going on to get this bridged with Nextcloud Talk.

Installation

You can install this app from the Nextcloud App Store.

If you don't want to download the app from the Nextcloud App Store, follow these steps to install this app:

You will need to have Node, npm, yarn (for compiling Element), and Make installed.

Clone the repository into apps/riotchat on your server then run

git submodule update --init --recursive
make

License

Copyright © 2020-2024 Gary Kim <[email protected]>

Licensed under AGPL-3.0-or-later.

Using code from the Element Web project. https://github.com/vector-im/element-web. Huge thanks to the Element Web developers. They're doing the actual heavy lifting here.

riotchat's People

Contributors

gary-kim avatar gary-kim-bot avatar jolly-jump avatar jonathanmmm avatar lorddavidiii avatar nauhcnoohc avatar nextcloud-bot avatar rakekniven avatar robertoszek avatar samuelllamzon avatar thestingray avatar valdnet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

riotchat's Issues

Preserve Element session for multiple accounts

Element session should be preserved even if you login to multiple NextCloud accounts on the same browser.

Currently this is what will happen instead:

  1. Login to Nextcloud with account nr 1.
  2. Login to Element.
  3. Logout from Nextcloud.
  4. Login to Nextcloud with account nr 2.
  5. Open Element (no need to login).
  6. Logout from Nextcloud.
  7. Login to Nextcloud with account nr 1 again.
  8. Open Element, and your session is gone.

Riot NC does not work with Firefox ESR.

I would like to test Riot NC client but « Impossible de joindre le serveur d’accueil Vérifiez que vous avec une connexion internet stable ou contactez l’administrateur du serveur » (sorry, it is in French).
In the Firefox console :

Error processing homeserver config: {…} 
base_url: "https://matrix-client.matrix.org"
​error: "Homeserver URL does not appear to be a valid Matrix homeserver"
state: "FAIL_ERROR" 

I also tested https://matrix.fdn.fr witch also doesn't work.

Client :

  • Firefox [68.9.0esr] ;
  • Debian Buster.

(Works with Chromium)

Server :

  • OS : Debian Buster ;
  • Apache ;
  • PostgreSQL 11.7
  • PHP : 7.3.14
  • NextCloud : 18.0.6 ;
  • Riot Chat : 0.4.3.

Riot Renamed to Element

Vector IM has announced that Riot.im will be renamed. This issue is for keeping track of all the changes required.

  • Repoint submodule (if the repo gets renamed)

It's likely that Vector will get a trademark for the new name so written permission to be able to use the new name would be nice.

Questions to consider

Should we also change the name of this app to match the upstream name?

App Icon Not Centered

The logo seems to not be centered. Should be a relatively simple change to the svg file.
image

Automatic backup and load of encryption key

Hello,

Would it be possible for riotchat to backup automatically the encryption key in a dedicated file into nextcloud the first time we connect to our matrix account from riotchat and then would it be possible for riotchat to load this encryption key automatically from that file every time we connect to our matrix account from nextcloud-riotchat?

In the best world (not sure if it's doable), the login/password would also be stored into an encrypted file (could be the same file I guess) stored into nextcloud so wherever we log into our nextcloud, we can easily and very fast reach our matrix account throw riotchat.

This encrypted file would be encrypted with the help of id/password of nextcloud like that even the technician who hold the nextcloud could not open the file without the id/password of a user.

Of course the situation when a user change his nextcloud's password would need to be treated...

SSO with Nextcloud

Hi,

no matter what I try I can't get SSO running with nextcloud. Is there a guide what to put in as oidc_provider?
I followed a guide from here:
matrix-org/synapse#8511
Have I misconfigured the oauth section in nextcloud? I don't know what to put in as redirection-uri
I tried the following:
https://matrix.example.de/_synapse/client/oidc/callback
After that, nextcloud displays the dialogue for granting access. But then I get the following error message:
There was an error
localpart is invalid:
Error code
mapping_error

The synapse server displays the following error message:
_File "/usr/local/lib/python3.8/site-packages/synapse/handlers/sso.py", line 606, in register_mapped_user
raise MappingException("localpart is invalid: %s" % (attributes.localpart,))

Can anyone help?
Best regards

Erich

[feature-request] Add option to connect to LDAP account

An option to associate the Element login with the given LDAP account (presumed Nextcloud uses LDAP) would be great.

In my case I have a Matrix server and my Nextcloud connected to the same LDAP server. Adding this option, the users could be automatically signed in the Element app as soon as they open it.

An option in the admin configuration would be the way to implement it.

Version File

Element Web expects a file called version at its root. For example: https://app.element.io/version.

We don't currently generate this file at build which means that Element does not know its own version. We should generate this file.

Basically, what we need to is to create a version file from the git tag and place it in 3rdparty/riot when the project is being build in the Makefile.

Project Name Change to "Element for Nextcloud"

The project is being renamed to "Element for Nextcloud". We need to change all the instances of the old name being used while keeping the project ID, PHP namespace, and URLs the same.

We also need to update the disclaimer regarding being unrelated to the upstream project to reflect the new name.

https://matrix.to/#/!YTvKGNlinIzlkMTVRl:matrix.org/$9r9cDRH7mRIvafglZGTCJRjnJx7kNqf3X8rj2iu3Dq8?via=matrix.org&via=privacytools.io&via=mozilla.org

Related to #79

Default Server Input ID Incorrect

<label
ref="server_name"
for="server_name"
>{{ t('riotchat', 'Default server name:') }}</label>
<input
id="default_server_name"
v-model="server_name"
type="text"
@change="updateSetting('server_name')"
>

The label does not properly point to the input because the id of the input is incorrect. This should be a simple one line fix.

Can't connect to server

I tried to ad a matrix-server and get an error-page. Here are some details:
nextcloud-element-error

Running Nextcloud 17.0.3.1

Feature req: Custom message for non-logged in users

It would be nice to be able to set a custom message for users who are not logged in.

Something like "Use your same username & password here that you used with riot.im" in native language in my use case.

Could be shown before actual Riot UI, as dialog over it or embedded in it, all should do the trick.

SSO Login Button

We could add a 3 dot menu on the Nextcloud top bar that has the option to open Element in it's own tab rather than in an iframe to allow users to login for SSO first.

Would help address #113

Nothing appears (Yunohost)

Hello ! 

What an amazing idea to create this app !
Unfortunately, it doesn't work yet on my server :(
Installations works without problem, but when I go to the app, nothing appaers :
Sélection_001
I don't know how I can help you to provide more informations, but here is what I can give you :
I run Nextcloud 18.02 on Yunohost 3.7.1.3

Thanks for your work, I hope to use it soon :D

Mic and Camera acces during call is suppressed

I noticed that whenever a call is made from within the App.
The mic and or camera for laptop is suppresed, and thereby the party can not see or hear you.
Kindly check on this issue.

Custom Config

Since not all of the config options are supported yet, let's have a check box that shows a text field with allows you to set your own config by providing JSON.

We can also to validation to ensure that it is proper JSON on the client side (server side as well can't hurt?).

Tie in with Nextcloud notifications

It would be really nice, if Element could tie in with the notification system of Nextcloud, so that notifications of new messages or mentions get listed in the bell/notification dropdown.
I don't know if that is technically feasible, because i think that Element would somehow need to run in the background to receive messages or you would maybe need to use the matrix-js-sdk to receive matrix message notifications which then are send to Nextclouds notification system.

Can't open files on encrypted channel

Hello,

I can't open files once they are unencrypted in the chat when it's on an encrypted channel. The file disappears when you click on it.
It's working fine when it's not encrypted though.

Nextcloud is 18.0.5.

Thanks,
Florian

Renovate Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Ignored or Blocked

These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.

Detected dependencies

composer
composer.json
  • nextcloud/coding-standard ^1.2.1
droneci
.drone.yml
git-submodules
.gitmodules
  • 3rdparty/riot-web master@a238990c256d255ae85579ee3baae65588b9521e
npm
package.json
  • @nextcloud/axios ^2.5.0
  • @nextcloud/dialogs ^3.2.0
  • @nextcloud/initial-state ^2.2.0
  • @nextcloud/router ^3.0.1
  • @nextcloud/vue ^8.14.0
  • core-js ^3.37.1
  • vue ^2.7.16
  • @babel/core ^7.24.9
  • @babel/eslint-parser ^7.24.8
  • @babel/preset-env ^7.24.8
  • @nextcloud/browserslist-config ^3.0.1
  • babel-loader ^9.1.3
  • css-loader ^7.1.2
  • eslint ^8.57.0
  • eslint-config-standard ^17.1.0
  • eslint-plugin-import ^2.29.1
  • eslint-plugin-node ^11.1.0
  • eslint-plugin-promise ^6.4.0
  • eslint-plugin-standard ^5.0.0
  • eslint-plugin-vue ^9.27.0
  • node-sass ^9.0.0
  • sass-loader ^14.2.1
  • vue-loader ^15.11.1
  • vue-style-loader ^4.1.3
  • vue-template-compiler ^2.7.16
  • webpack ^5.93.0
  • webpack-cli ^5.1.4
nvm
.nvmrc
  • node 20

Media not showing up

Hi,
Great initiative. Running matrix-synapse for a while already on my own server and thought to try your Nextcloud integration. Seems to work however no media is retrieved from the matrix server. The retrieval of the media (pictures, icons, avatars) does work with the riot web client, riotx and all other clients.

Contribuing Documentation

Using this as a draft for a CONTRIBUTING.md to be added to the repo. Feel free to comment if you have anything you think should be added.


Contributing to Riot Chat for Nextcloud

Thank you for getting involved in the development of Riot Chat for Nextcloud.

To get started, first set up a Nextcloud development environment. Refer to the Nextcloud Developer Documentation for information on how to do that.

Once you get your Nextcloud development environment set up, clone this repo into apps/riotchat in your Nextcloud directory then go in to the directory and run the following commands:

git submodule update --init --recursive
make

This will fetch and build all the files required to use the app.

To start the Javascript build in watch mode, you can use npm run watch.

Sign-off your commit

When you commit your change, please sign off on your work to certify that you have read and agreed to the Developer Certificate of Origin. By signing off on your commit, you certify that the changes are yours or you have the right to use it in an open source contribution.

You can easily sign off on your work by adding the -s flag when you commit your change.

git commit -s

Otherwise, you can add the following line to your commit message to certify the DCO.

Signed-off-by: Random J Developer <[email protected]>

License Header

If you modify an existing file, please keep the existing license header as
it is and just add your copyright notice:

@copyright Copyright (c) <year>, <your name> (<your email address>)

If you create a new file please use this license header:

/**
 * @copyright Copyright (c) <year>, <your name> (<your email address>)
 *
 * @license GNU AGPL version 3 or any later version
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 */

Developer Certificate of Origin

Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.


Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.

File upload/link from Nextcloud

Would be nice if Nextcloud files system can be tied in somehow.

Auto share link create or better yet embed content from Nextcloud

WebDav?

Option to jump directly to /riotchat/#/login

First of all, thank you very much for your work integrating Riot in Nextcloud. I didn't think this would happen so fast 🥳 👍

The app opens at /riotchat/#/welcome where you can select the language and choose between register or login.
In a setup with a local homeserver where all users are already registered or self registering isn't possible it would be nice to have a setting that skips the welcome screen and jumps directly to the login screen.

Renaming the App

In the interest of adding more features beyond serving Element, I think it'd be a good idea to rename the project.

Most likely to "Matrix Integration" to signify it includes various integrations with Matrix.

cc @Sorunome

Add Dashboard

A dashboard (Nextcloud 20 feature) that shows new messages could be nice.

The idea would be to use the matrix-js-sdk to query for messages with the token we already have from the user logging into Element and use that to request any recent messages from the homeserver and show it to the user.

Integration Manager & Jitsi cannot be reached

Hi,
Found two more reachability problems:

When trying to access a jitsi videoconference, i get the message: Requests to the server have been blocked by an extension. (ofc other clients work)

Also when trying to open the integration manager i get the message:

Cannot connect to integration manager
The integration manager is offline or it cannot reach your homeserver.

The integration manager works on other clients for the same homeserver.

Include Changelog into App Store listing

It would be tremendously helpful to have the changelog included into the Nextcloud App Store listing. Currently, any (potentially breaking) changes must be fetched from this repository. Especially for production systems, a changelog at a glace in the app store listing might be helpful.

Allow setting integrations

Extra configs:
integrations_ui_url, integrations_rest_url, integrations_widgets_url.

Documentation for Riot Web configs: https://github.com/vector-im/riot-web/blob/develop/docs/config.md

Just need to add these configs to the AvailableSettings then set it in the ConfigController. After that, add the setting to the frontend in AdminSettings.vue.

public const AvailableSettings = [
'base_url' => 'https://matrix-client.matrix.org',
'server_name' => 'Matrix Homeserver',
'disable_custom_urls' => 'false',
'disable_login_language_selector' => 'false',
];

public function config() {
// TODO: fill in branding from theming
$lang = $this->l10n->getLanguageCode();
$config = [
'disable_guests' => true,
'piwik' => false,
'settingDefaults' => [
// TODO: Check if this actually works :)
'language' => $lang,
],
'disable_custom_urls' => $this->config->getAppValue(Application::APP_ID, 'disable_custom_urls', Application::AvailableSettings['disable_custom_urls']) === 'true',
'disable_login_language_selector' => $this->config->getAppValue(Application::APP_ID, 'disable_login_language_selector', Application::AvailableSettings['disable_login_language_selector']) === 'true',
'default_server_config' => [
'm.homeserver' => [
'base_url' => $this->config->getAppValue(Application::APP_ID, 'base_url', Application::AvailableSettings['base_url']),
'server_name' => $this->config->getAppValue(Application::APP_ID, 'server_name', Application::AvailableSettings['server_name']),
],
],
];
return new JSONResponse($config);

https://github.com/gary-kim/riotchat/blob/49029ec32c43e0ea95862247cbdf9129168d39f0/src/components/AdminSettings.vue

[BUG] Can't play audio and video in encrypted rooms

If I send a video/audio or if I receive one I can not play it, nor can download it.

Always getting the following popup when the message containing the attachment gets loaded (navigation to the room, where it was sent, or going back in history):
image

Also the player is different:
image
It can't load the length, and also there is no link to download it.

Also checked on app.element.io and it is working correctly:
image

I checked that Firefox says that:
Content Security Policy: The page’s settings blocked the loading of a resource at blob:https://samedomainasriotchat/randomhashhere (“media-src”).
(The media is playable from that URI if I open it in another tab)

I also tried to allow it in the plugin by adding:

$csp->addAllowedMediaDomain($this->request->getServerHost());
$csp->addAllowedMediaDomain($default_server_domain);
$csp->addAllowedMediaDomain('blob:');

to custom_apps/riotchat/lib/Controller/ConfigController.php::index()

It gets applied correctly, as it appears in the browser's request:
image

Somebody from the community helped to check it out, and we got to the result that it only breaks in encrypted rooms.
But when it goes wrong it is wrong on their end too.
In the Vector hosted Element it works, that's why I guess it will be a plugin issue.

Installed Riotchat version: 0.6.2
Nextcloud: 19.0.0
Using it with Nginx reverse proxy (no CSP settings on that side)
Firefox: 78.0.2 on Arch Linux

Please tell me if you need any more info.

Unable to grant permissions for Jitsi for mic and video via Chromium based browser.

When connecting to a Jitsi call via Element in Nextcloud the browser does not grant permissions for Mic and Camera and results in an error trying to access these devices.

I have only tested this on two machines both using Edge, Chrome, Brave and other Chromium based browsers. I am unable to use the Element client in NextCloud for Jitsi calls. I get this error as shown here.

image

Tested on two different Next Cloud instances fully updated for both Element and NextCloud
Tested on two machines with Windows 10 and Edge at least.

Implement Intergated Login Based on Ldap, or nextcloud credentials

Some of the matrix/synapse installations that we have running on our servers, make use of Ldap authentication for login.
Same applies to the nextcloud instance that we will be possibly running on Nextcloud.

Instead of asking users to login again, Allow the system to use the bakedin nextcloud authentication, This is in a possibility that nextcloud use ldap, and also, to remove the reequipment for login, in instances where the server has been pre-defined with no ability to change it.

No connection to local synapse/matrix server

Steps to reproduce

Install / activate Riot Chat module
Configure the server's url
Try to use / connect Riot Chat module

Expected behaviour

A connection .
Actual behaviour

Doesn't connect . msg: connection impossible to localhost:8008
Server configuration

Operating system: debian 10

Web server: apache 2.4

Database: mariaDB 10

PHP version: php7.3

Nextcloud version: 19

Fresh installation

Where did you install Nextcloud from:
https://download.nextcloud.com/server/releases/nextcloud-19.0.0.tar.bz2

Are you using external storage, if yes which one: local/smb/sftp/... : No

Are you using encryption: Yes

**Are you using an external user-backend, No
Client configuration

Browser: Firefox 76.0.1

Operating system: Linux

On the server, launching : lynx http://localhost:8008 or lynx localhost:8008
gives a positive greeting message from the im server .

Also, I have sniffed the network layer with tcpdump, I saw zero trafic on port 8008 , while trying to connect thru nextcloud .

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.