Giter Site home page Giter Site logo

matrix.sh's People

Contributors

efelon avatar fabianonline avatar mgoellnitz avatar rom4nik avatar uweber avatar wioxjk 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

matrix.sh's Issues

Accept the token as a parameter

This tool is very good in CI/CD pipelines, but I am not confident providing the username and password for it to extract the token. It should be good to allow provident the token as an argument, usually provided from the secrets manager store.

--join-room doesn't work

$ ./matrix.sh --join-room
Enter the ID or address of the room you want me to join: #myroom:matrix.org

An error occurred. The matrix server responded with:
M_UNKNOWN: No known servers

Sending a single line string appends "\n" to it

This is only a "cosmetics" report.

I'm on

  • Raspberry Pi OS 32bit (Buster)
  • Latest Synapse running on the same Pi.

I can send text messages without problems, but when I'm sending a file like this:

/opt/matrix_cli/matrix.sh --identifier='system.internal' --room='!***********:domain.cc' --file="/my/diff.txt"

The raw data of the message show

"content": {
    "body": "diff.txt\n",
    "msgtype": "m.file",
    "filename": "diff.txt\n",
    "url": "mxc://domain.cc/********************"

and when trying to download the file, it will be saved as diff.txt_. Content of the file is fine.

Let me add that I'm so happy about your script. It also did work right away.

--select-default-room doesn't work

$ ./matrix.sh --select-default-room
Getting Rooms...
Joined rooms:
jq: error (at <stdin>:1): null (null) has no keys

Rooms I'm invited to:
jq: error (at <stdin>:1): null (null) has no keys
Which room do you want to use?
Enter the room_id (the thing at the beginning of the line): #myroom:matrix.org

An error occurred. The matrix server responded with:
M_UNRECOGNIZED: Unrecognized request

Specify license

Thanks for your work! Please provide a FOSS license for the script.

File upload via Pantalaimon

I'm trying to use Pantalaimon so that messages become encrypted.

Simple text works ok. Images don't. Since this does not happen if not using Pantalaimon, it can be that the issue is not with Matrix.sh but pantalaimon itself, but i cannot debug further.

Error in matrix.sh:

matrix.sh --image --file=5Mph94m.jpeg
Sending file...
{"m.upload.size":2147483648}
Uploading...
jq: error (at :1): Cannot index number with string "errcode"
parse error: Invalid numeric literal at line 1, column 13

Error in Pantalaimon log:

pantalaimon-pantalaimon-1 | [2023-01-04 21:25:14.699830] INFO: pantalaimon: Adding media info for aguiarvieira.pt/lvGHuLnVIzFqiBgfzLXhUtBK to the store
pantalaimon-pantalaimon-1 | Error handling request
pantalaimon-pantalaimon-1 | Traceback (most recent call last):
pantalaimon-pantalaimon-1 | File "/usr/local/lib/python3.8/site-packages/aiohttp/web_protocol.py", line 433, in _handle_request
pantalaimon-pantalaimon-1 | resp = await request_handler(request)
pantalaimon-pantalaimon-1 | File "/usr/local/lib/python3.8/site-packages/aiohttp/web_app.py", line 504, in _handle
pantalaimon-pantalaimon-1 | resp = await handler(request)
pantalaimon-pantalaimon-1 | File "/usr/local/lib/python3.8/site-packages/pantalaimon/daemon.py", line 1053, in send_message
pantalaimon-pantalaimon-1 | return await _send(self.conf.ignore_verification)
pantalaimon-pantalaimon-1 | File "/usr/local/lib/python3.8/site-packages/pantalaimon/daemon.py", line 1005, in _send
pantalaimon-pantalaimon-1 | if content["info"].get("thumbnail_url", False):
pantalaimon-pantalaimon-1 | KeyError: 'info'

Upload image: stat: illegal option -- c

Trying to upload a picture provides a warning:

$ bash matrix.sh --room='' --file=image.png --image
stat: illegal option -- c
usage: stat [-FlLnqrsx] [-f format] [-t timefmt] [file ...]

Video uploads result in error

Hello.

While attempting to upload a video to a channel, the script does not return a error.

On the element website the message is already in error prompting to send a log.tar to synapse Github

On the element android app, the file name shows up, pressing on it returns "url is null".

Aparently, this is caused by a filename with spaces in it.

Can anyone confirm this behaviour ?

The Generated Identifier Is Leaking Crucial Private Information

The generated identifier during the login (used for initial_device_display_name) is built using private information that a user may not want to share with others (local user and host name).

This should be properly documented and possible to easily overload, e.g. there could be a --custom-identifier option with its help mentioning how the default identifier is constructed out of the local user and host names.

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.