Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Threema (Gateway) #986

Open
rugk opened this issue Nov 1, 2023 · 10 comments
Open

Support Threema (Gateway) #986

rugk opened this issue Nov 1, 2023 · 10 comments

Comments

@rugk
Copy link
Contributor

rugk commented Nov 1, 2023

📢 What is the name of the service?

Threema

🔗 Provide some details about the service that can help with it's development.

💡 Anything else?

Generally what is Threema? Threema is a quite popular e2e-secure messenger especially in the German-speaking area (so-called DACH area).

One thing is important to note:

  • Threema Gateway, which is the API solution intended for such use cases, has two modes. One is basic security, where you basically just make a REST API call and that it is.
  • The other one, is e2e security, there you encrypt the message on the device/server and only the Threema message receiver can decrypt it later on their client. Of course this may be harder to implement, but all libraries Threema provides for this usually support this mode too (at least for basic text sending etc.).
  • IMHO, ideally, you'd support both. Depending on what users want to do with them, both have advantages and disadvantages.

Also you likely will be interested in the Python SDK: https://gateway.threema.ch/en/developer/sdk-python
https://github.com/threema-ch/threema-msgapi-sdk-python

Other FLOSS projects that have an integration are e,g. Grafana or Mattermost (found no link, but well). Also, I guess, usually such companies are quite nice if you need some credits for developing an integration for FLOSS projects, so just ask them if needed, they may support you here.

@caronc
Copy link
Owner

caronc commented Nov 5, 2023

So i made an attempt at this, but i'll need to read the docs a bit more to figure out how I can generate a Secret Key (for Simple Messaging - to start with).

You can check out the branch (instructions are attached on PR) and try it out for yourself if you already have a secret to work with

@rugk
Copy link
Contributor Author

rugk commented Nov 9, 2023

Well the secret is – as a "commercial" service – something one needs to buy for a few bucks. See pricing here. However, for you I guess usually such companies are always very helpful if you politely ask and explain that you do plan to implement this in an open-source project and they may also help you there for free… 🙂

@caronc
Copy link
Owner

caronc commented Nov 16, 2023

Added wiki link here; Simple Threema (Gateway) support now added! 🚀

@threema-eduard
Copy link
Collaborator

Thank you both again for helping to make this happen!

@caronc thanks for your last fixup and the merge!

I've gone through the linked docs and noticed some small things which I would like to address somewhere (I think we cannot directly make PRs on Wikis.)

Source: ttps://gateway.threema.ch/
Icon Support: No
Message Format: Text
Message Limit: 3500 Characters per Message

should rather be

Source: https://gateway.threema.ch/
Icon Support: Yes
Message Format: Text
Message Limit: 3500 Characters per Message

Icon Support: I am not 100% sure what this means but after a quick test I verified that emojis sent via Apprise CLI are arriving properly in Threema apps so this should indeed be supported.

There are some other - presumably minor - improvements. Perhaps we could fork the Wiki locally and then ping you here with our adjustments? How do you usually handle this? :)

@caronc
Copy link
Owner

caronc commented Nov 17, 2023

Whops, sorry about the wiki page; it's been updated - good catch.

The reference to Icon support is a bit misleading; it probably should read avatar. Discord, Slack, Matrix, etc all include another directive in their payload which allows you to toggle the avatar. Apprise has a different setting it puts here (unless you turn it off) that is red, yellow, green, or blue depending on the status of the notice being sent.

To fix the inconsistency with services that don't provide this, i began trying to allow these same status types so they are visible in text messages, etc using ascii characters, but technically i should also do a utf-8 one that includes nicer icons already available to the systems that can leverage it (like yours). I haven't gone through all 96+ plugins yet to assign them. If anything i should make another update to all 96+ wiki pages to just remove reference to this and build a better "feature card" of some sort. (sorry for long rant).

The idea would be to also have a global (apprise configuration) of ?status= (just like overlfow=, cto=, rto=, etc) that by default is set to on that includes these. Another story for another day...

In your case, it's not a bad thing that Icon Support is No.

here are some other - presumably minor - improvements. Perhaps we could fork the Wiki locally and then ping you here with our adjustments? How do you usually handle this? :)

I thought it was as simple as checking out [email protected]:caronc/apprise.wiki.git, but i can look into the back-end to see if there are permissions/configurations i need to make. I could also just add you as a contributor if you like, i don't think there is harm in that; i trust you won't go rogue on me? 🙂 Thoughts/Advice?

@threema-eduard
Copy link
Collaborator

No worries there :) we are glad that we were able to take part in the integration process.
As for the icon ("avatar") support, Thanks for the clarification, I see what you mean now. As you described, this special flag is available with certain services, but not currently with Threema Gateway. You will certainly find a cool way to integrate this with the many available services in the future.

As for the Wiki part: I just checked and it seems that we can clone the wiki (which seems to be a separate repo, GitHub seems to handle it that way) but will be unable to push it without contributor access (we cannot create our own "fork" of the wiki, this just seems to be how it is).

We could just open a separate issue with the corrections which you may then copy over to the Wiki via the UI or you may provide me with the required access to make the changes directly. Choose whichever option you are most happy with 🙂

@caronc
Copy link
Owner

caronc commented Nov 18, 2023

You should have contributer status now. Go nuts🙂

@threema-eduard
Copy link
Collaborator

Thank you for providing me access! I just updated the wiki, so everything should be set now :)

@rugk
Copy link
Contributor Author

rugk commented Dec 7, 2023

So can this issue be closed or do you want it to track Threema Gateway e2e support?

@caronc
Copy link
Owner

caronc commented Dec 8, 2023

We can close the ticket for now. But it's something worth revisiting i think. I need to investigate it more. If it involves having a pre-generated private key that's 256-512 characters, it might not be as intuitive

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants