Giter Site home page Giter Site logo

matrix-appservice-mattermost's People

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

Watchers

 avatar  avatar  avatar

matrix-appservice-mattermost's Issues

Migrate away from matrix-appservice-bridge

matrix-appservice-bridge comes with a lot of extra baggage that we do not use.
For example, it includes a database (nedb), a logging library (winston, as
opposed to loglevel which comes with matrix-js-sdk) and metrics (prom-client).

It also enforces a lot of dependency choice on us, e.g. json validator, command
line parser, etc.

We can instead use matrix-js-sdk and matrix-appservice directly.

Reattempt to bridge channel when invited to room

If a mapping is added to the config, but the bot user cannot join the matrix
room, then the channel fails to bridge. If the bot is later invited to the room
while it is running, it should try to bridge again.

Do the same when the power level changes.

Improve message throughput

Currently the global lock means messages are processed one-by-one, and that can take a while, even when all of matrix, mattermost and the bridge are on the same machine. We should use async properly, but without running into race conditions or message reordering

Rapid replies are not recorded as replies

If one quickly sends multiple posts to a Mattermost thread in Mattermost, some of the posts end up not being marked as a reply to the root thread. This should not have happened because of the lock.

Add optional webhook mode

Allow using incoming webhook to post messages from matrix, which would avoid
creating a mattermost user for each matrix user.

project status?

seems there has been no work in this bridge for a long time, is it abandoned?

Configure bridge interactively

Users should be allowed to configure mappings without editing the configuration
file. This can be achieved either via private messages with the bot, or simply
dynamically creating a matrix room for every mattermost channel the bot is in.

no clue how to reolve

root@f52c6f46-acc6-4bc2-b6f4-6da33eeda2e2:/app/code# su cloudron
cloudron@f52c6f46-acc6-4bc2-b6f4-6da33eeda2e2:/app/code$ cd ../data/matrix-appservice-mattermost/
cloudron@f52c6f46-acc6-4bc2-b6f4-6da33eeda2e2:/app/data/matrix-appservice-mattermost$ ./start&
[2] 275
cloudron@f52c6f46-acc6-4bc2-b6f4-6da33eeda2e2:/app/data/matrix-appservice-mattermost$ Output registration to: registration.yaml
cat bridge.log
Bridge loaded: 1433.685ms
(node:283) UnhandledPromiseRejectionWarning: M_UNKNOWN_TOKEN: Unrecognised access token
at parseErrorResponse (/app/data/matrix-appservice-mattermost/node_modules/matrix-js-sdk/lib/http-api.js:826:13)
at /app/data/matrix-appservice-mattermost/node_modules/matrix-js-sdk/lib/http-api.js:781:17
at Request._callback (/app/data/matrix-appservice-mattermost/node_modules/matrix-js-sdk/lib/http-api.js:715:9)
at Request.self.callback (/app/data/matrix-appservice-mattermost/node_modules/request/request.js:185:22)
at Request.emit (events.js:310:20)
at Request. (/app/data/matrix-appservice-mattermost/node_modules/request/request.js:1154:10)
at Request.emit (events.js:310:20)
at IncomingMessage. (/app/data/matrix-appservice-mattermost/node_modules/request/request.js:1076:12)
at Object.onceWrapper (events.js:416:28)
at IncomingMessage.emit (events.js:322:22)
(node:283) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:283) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
I need help....

config.zip

Encrypted rooms are not supported

I'm trying to setup a bridge to an encrypted room. Unfortunately, when I send a message to Matrix, the bridge writes into the log:

Unknown matrix event type: m.room.encrypted

Encryption there is not relevant, but Matrix does not support disabling encryption for a room. So I'm wondering if it is possible to add support of event m.room.encrypted'?

Dependency Dashboard

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

Warning

These dependencies are deprecated:

Datasource Name Replacement PR?
npm @types/marked Unavailable

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • Update dependency @types/tape to v4.13.4
  • Update alpine Docker tag to v3.20
  • Update dependency ajv to v8.16.0
  • Update dependency eslint to v8.57.0
  • Update dependency loglevel to v1.9.1
  • Update dependency marked to v4.3.0 (marked, @types/marked)
  • Update dependency pg to v8.12.0
  • Update dependency tape to v5.8.1
  • Update dependency turndown to v7.2.0
  • Update dependency typescript-json-schema to ^0.64.0
  • Update actions/cache action to v4
  • Update actions/checkout action to v4
  • Update actions/setup-node action to v4
  • Update dependency @types/marked to v6
  • Update dependency @types/node to v20
  • Update dependency @types/tape to v5
  • Update dependency ajv-formats to v3
  • Update dependency eslint to v9
  • Update dependency marked to v13
  • Update dependency prettier to v3
  • Update dependency typescript to v5
  • Update postgres Docker tag to v16
  • Update typescript-eslint monorepo to v7 (major) (@typescript-eslint/eslint-plugin, @typescript-eslint/parser)
  • ๐Ÿ” Create all rate-limited PRs at once ๐Ÿ”

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

docker-compose
docker/docker-compose.yaml
  • postgres 14.1-alpine
dockerfile
docker/appservice/Dockerfile
  • alpine 3.15
docker/mattermost/Dockerfile
  • alpine 3.15
docker/synapse/Dockerfile
  • alpine 3.15
github-actions
.github/workflows/test.yaml
  • actions/checkout v2
  • actions/setup-node v2
  • actions/cache v2
npm
package.json
  • ajv ^8.0.0
  • ajv-formats ^2.1.1
  • express ^4.17.2
  • form-data ^4.0.0
  • js-yaml ^4.0.0
  • loglevel ^1.8.0
  • marked ^4.0.0
  • matrix-js-sdk ^8.2.0
  • node-fetch ^2.6.0
  • pg ^8.5.1
  • turndown ^7.0.0
  • typeorm ^0.2.29
  • ws ^8.0.0
  • yargs ^16.0.0
  • @types/express ^4.17.13
  • @types/marked ^4.0.1
  • @types/node ^16.0.0
  • @types/node-fetch ^2.5.7
  • @types/tape ^4.13.0
  • @typescript-eslint/eslint-plugin ^5.0.0
  • @typescript-eslint/parser ^5.0.0
  • eslint ^8.0.0
  • prettier ^2.3.0
  • sqlite3 ^5.0.0
  • tape ^5.0.1
  • typescript ^4.5.0
  • typescript-json-schema ^0.50.0

  • Check this box to trigger a request for Renovate to run again on this repository

Implement direct/group messages

The main problem to solve is that in Mattermost, group chats have immutable membership --- you cannot add new users to existing direct/group chats. This is possible on the Matrix side. How do we want to deal with this? Even if we decide to ignore users added later in matrix (which would lead to a fairly broken user experience), this may cause issues during the initial channel creation.

Puppeting an existing Mattermost user

Hello!

Disclaimer, I honestly had no better idea for a shorter title, sorry for that...

Basically, I used to frequent the JS++ Mattermost instance to talk to the people there but now that I use Matrix as my daily driver for just about all my IM needs, I wanted to bring this group back into my setup so I could talk to them again.

I only own a regular account and really only need this one to be puppeted. How would I go setting up a scenario like this, where just one user is puppeted and all channels it can access are thus bridged?

Thanks in advance!

Kind regards,
Ingwie

Add unprivileged mattermost user mode

It would be nice to be able to login to mattermost with your own user and have all the channels you are part of bridged to matrix, without needing a bot with administration privilages. This would obviously prohibit the creation of users on the mattermost side

Test for errors when leaving unbridged channels

In particular I have seen the following error in production:

Error: 400 DELETE /channels/<REDACTED>/members/<REDACTED>: {"id":"api.channel.remove_channel_member.type.app_error","message":"Unable to remove user from a channel.","detailed_error":"","request_id":"byq49ee7tt8ammx47u8cf8he8o","status_code":400}

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Location: package.json
Error type: The renovate configuration file contains some invalid settings
Message: Configuration option 'packageRules[0].node' should be a json object, Invalid configuration option: author, Invalid configuration option: bin, Invalid configuration option: license, Invalid configuration option: main, Invalid configuration option: name, Invalid configuration option: packageRules[1].ajv, Invalid configuration option: packageRules[1].express, Invalid configuration option: packageRules[1].form-data, Invalid configuration option: packageRules[1].js-yaml, Invalid configuration option: packageRules[1].loglevel, Invalid configuration option: packageRules[1].marked, Invalid configuration option: packageRules[1].matrix-js-sdk, Invalid configuration option: packageRules[1].node-fetch, Invalid configuration option: packageRules[1].pg, Invalid configuration option: packageRules[1].turndown, Invalid configuration option: packageRules[1].typeorm, Invalid configuration option: packageRules[1].ws, Invalid configuration option: packageRules[1].yargs, Invalid configuration option: packageRules[2].@types/express, Invalid configuration option: packageRules[2].@types/node, Invalid configuration option: packageRules[2].@types/node-fetch, Invalid configuration option: packageRules[2].@types/tape, Invalid configuration option: packageRules[2].@typescript-eslint/eslint-plugin, Invalid configuration option: packageRules[2].@typescript-eslint/parser, Invalid configuration option: packageRules[2].eslint, Invalid configuration option: packageRules[2].prettier, Invalid configuration option: packageRules[2].sqlite3, Invalid configuration option: packageRules[2].tape, Invalid configuration option: packageRules[2].typescript, Invalid configuration option: packageRules[2].typescript-json-schema, Invalid configuration option: renovate, Invalid configuration option: scripts, Invalid configuration option: version, The "node" object can only be configured at the top level of a config but was found inside "packageRules[0]"

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.