Enabled Olm encryption

This commit is contained in:
2021-03-24 13:54:36 +01:00
parent e547551fde
commit 9b3af334ae
4 changed files with 53 additions and 3 deletions

View File

@@ -1,7 +1,22 @@
# Okupa mi coche - Frontend Angular
Gestión de viajes en el valle.
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 10.2.1.
Instalar OLM:
npm install https://packages.matrix.org/npm/olm/olm-3.2.1.tgz
npm install path
En package.json despues de `devDependencies` añadir:
```
"browser": {
"crypto": false,
"fs": false
}
```
Error dependencias:
https://github.com/matrix-org/matrix-js-sdk/issues/1645
## Development server

31
package-lock.json generated
View File

@@ -8791,6 +8791,10 @@
"integrity": "sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==",
"dev": true
},
"olm": {
"version": "https://packages.matrix.org/npm/olm/olm-3.2.1.tgz",
"integrity": "sha512-B87bTpGIGieuV2FNauChjjQtVltwTGagQFoHm+3Dcse4amKAAGJB/I54dnP/JtbHZ+RYVoApM2OQ46Z4VH6eNg=="
},
"on-finished": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz",
@@ -9146,6 +9150,30 @@
"integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=",
"dev": true
},
"path": {
"version": "0.12.7",
"resolved": "https://registry.npmjs.org/path/-/path-0.12.7.tgz",
"integrity": "sha1-1NwqUGxM4hl+tIHr/NWzbAFAsQ8=",
"requires": {
"process": "^0.11.1",
"util": "^0.10.3"
},
"dependencies": {
"inherits": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
"integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
},
"util": {
"version": "0.10.4",
"resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz",
"integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==",
"requires": {
"inherits": "2.0.3"
}
}
}
},
"path-browserify": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.1.tgz",
@@ -10643,8 +10671,7 @@
"process": {
"version": "0.11.10",
"resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz",
"integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=",
"dev": true
"integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI="
},
"process-nextick-args": {
"version": "2.0.1",

View File

@@ -26,6 +26,8 @@
"angular-auth-oidc-client": "^11.6.4",
"matrix-js-sdk": "^9.9.0",
"moment": "^2.29.1",
"olm": "https://packages.matrix.org/npm/olm/olm-3.2.1.tgz",
"path": "^0.12.7",
"rxjs": "~6.6.6",
"tslib": "^1.14.1",
"zone.js": "~0.10.2"
@@ -49,5 +51,9 @@
"ts-node": "~8.3.0",
"tslint": "~6.1.0",
"typescript": "^4.0.7"
},
"browser": {
"crypto": false,
"fs": false
}
}

View File

@@ -1,5 +1,7 @@
import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import * as olm from 'olm';
global.Olm = olm;
import * as matrix from 'matrix-js-sdk';
@Injectable({