question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Attachment support for Matrix

See original GitHub issue

💡 The Idea

Apprise supports m.text for Matrix. Can we get attachment support too?

Use case

One use case would be to send files to your privately self-hosted messenger Element.io (by Matrix). For example, a notification pushed from your security camera that contains a picture or a 10 second video.

Simple

Just support attachments through m.file.

Advanced

Detect the file type before sending m.file to determine if it’s a video or picture. If so, send m.video or m.image in stead. Create a thumbnail and send it as a thumbnail.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
caronccommented, May 29, 2022

Just noticing that this is a duplicate of #356 that has been around a bit longer then this ticket. This ticket is much more detailed, but just by cross-referencing it, all the info we shared won’t get lost.

This is a bit of a feat i haven’t braved yet. Matrix has a bit of a convoluted interface. But I haven’t forgotten.

To prevent having duplicate tickets, I’m just going to close this one in lieu of the other.

1reaction
Redsandrocommented, Aug 1, 2021

Thank you for the words @caronc. I love it when repo owners respond to tickets ❤️ means that the project is alive.

I was surprised the project is in python, because this sounds like a very node.js job. But that’s just me projecting. Unfortunately my python days are so outdated that the source looks a bit intimidating to me, and I think especially Matrix is not the easiest job because AFAIK attachments need to be encrypted, and unless I’m mistaken, there is no scaffolding for that in your original code yet.

So I guess it could use some:

  • refactoring; plus some
  • configurable encryption key implementation using libolm that you can theoretically
  • use for messaging as well, and then implement
  • attachments, followed by
  • mimetype specific attachments for images and video (re-using telegram logic), and to top it off
  • add thumbnail support for perfect notifications.

When I write it out like that, it’s not a cute little enhancement indeed, and I know how it is: I completely understand if you have other priorities in this project or in life.

Perhaps I can help with a trick called “appeal to psyche”: Matrix and Element are pretty cool. This is one of your first plugins. It’s your baby! Did you know that the Matrix plugin for Apprise was born on January 2, 2019 at 19:25 UTC? Tomorrow on August 2 it will turn exactly 31 months old. That’s a good age for some love and refactoring. Imagine people over the world congratulating each other when they discover a notification framework that supports full media notification metadata and attachments on Element!

Did it work? 👼

Read more comments on GitHub >

github_iconTop Results From Across the Web

Matrix Encrypt Attachment - GitHub
Supports browsers using WebCryptoAPI and Node.js via crypto . This project builds on and deprecates browser-encrypt-attachment to add support for non-browser ...
Read more >
Scaffold/matrix attachment region - Wikipedia
The term S/MAR (scaffold/matrix attachment region), otherwise called SAR (scaffold-attachment region), or MAR (matrix-associated region), are sequences in ...
Read more >
ECL Cell Attachment Matrix - Sigma-Aldrich
ECL Cell Attachment Matrix · Properties · Description · Safety Information · Documentation · Reviews · Support · Orders · Company.
Read more >
Self-complementary oligopeptide matrices support ... - PubMed
These matrices provide a novel experimental system for analysing mechanisms of in vitro cell attachment and may have applications in in vivo studies...
Read more >
Self-complementary oligopeptide matrices support ...
These matrices provide a novel experimental system for analysing mechanisms of in vitro cell attachment and may have applications in in vivo studies...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found