caronc / apprise

Apprise - Push Notifications that work with just about every platform!
https://hub.docker.com/r/caronc/apprise
BSD 2-Clause "Simplified" License
10.94k stars 385 forks source link

Support Threema (Gateway) #986

Open rugk opened 8 months ago

rugk commented 8 months ago

:loudspeaker: What is the name of the service?

Threema

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

:bulb: 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:

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 commented 8 months ago

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 commented 8 months ago

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… :slightly_smiling_face:

caronc commented 7 months ago

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

threema-eduard commented 7 months ago

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 commented 7 months ago

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 git@github.com: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? :slightly_smiling_face: Thoughts/Advice?

threema-eduard commented 7 months ago

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 :slightly_smiling_face:

caronc commented 7 months ago

You should have contributer status now. Go nuts🙂

threema-eduard commented 7 months ago

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

rugk commented 7 months ago

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

caronc commented 7 months ago

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