Closed caronc closed 10 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
7e87807
) 99.51% compared to head (3025c28
) 99.51%. Report is 1 commits behind head on master.
:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Please let me know anytime if you need any assistance with integrating Gateway. :)
I wrote all of the code yesterday and forgot to git add
it... -oops :eyes: ...
Just pushed it now for your review.
One thing i'd like to document is how to you can obtain your secret
(for the simple mode); i don't see a means of generating it through the website/admin area.
One thing i'd like to document is how to you can obtain your
secret
(for the simple mode); i don't see a means of generating it through the website/admin area.
We just reached out to you via E-Mail but the process can be broken down to a few steps:
Just pushed it now for your review.
We will gladly look into it as soon as we can spare some time, thank you in advance for your work!
@Flash1232 Thank you for this amazing review!! 🙏🙏🙏⭐
I am a bit slow addressing things these days; weekends and some evenings are all I got. But I will 100% address all of this soon!
Edit: @threema-eduard & @rugk I meant to also give you each credit here, but i'll leave it to both of you now as you were both incredibly helpful! thank you so much! :pray:
So i did the following:
gateway_id
from
added into payloadto
wasn't even being even processed correctly; now it isQuestion: If a Gateway ID isn't a Threema ID, are Threema ID's still restricted to 8 characters as defined here?
@rugk
Also considering this may be implemented is threema:// the correct "protocol" to go with? (As it is likely hard or only with breaking changes, changeable?) Would e2e mode then be called threema-e2e://? Or shall we call it threema-basic:// already?
What will happen is that the url will become threema://credentails?mode=basic
or mode=e2e
. Depending on the content specified in the credentials
area, we can automate/detect what you're attempting to do with the option of fixing the mode=
anyway just to enforce (should detection choose something that wasn't intended)
Dear @caronc
Thank you for updating your PR.
I retried with the latest changes and everything seems to be working now!
Question: If a Gateway ID isn't a Threema ID, are Threema ID's still restricted to 8 characters as defined here?
You potentially inferred this from https://github.com/caronc/apprise/pull/993#discussion_r1383440019, right? Sorry for not being clearer on this: Gateway IDs are Threema IDs in that they must be, otherwise no Threema client would be able to communicate with them. There is a special distinction: Gateway IDs are - strictly speaking - a subset of Threema IDs, but we will only assign the '*' at the first position to Gateway IDs (regular "user" Threema identities are alphanumeric without special chars). Any kind of Threema ID always consists of 8 characters (including Gateway IDs).
So i did the following:
- user renamed to
gateway_id
- at least 1 target must be specified (Gateway ID != Threema ID)
- dropped + in E.164 phone no
from
added into payload- Threema Gateway references everywhere (vs just Threema)
- Test cases improved allowing me to notice the
to
wasn't even being even processed correctly; now it is
Thank you so much!
And also thanks to @rugk for spotting some of the things I did not catch!
Description:
Related issue (if applicable): #986
Added Threema (Gateway) support.
This only supports the Simple Methods right now due to the size of the private key (it would make for one heck of a long Apprise URL :wink:. This doesn't rule e2e encryption down the road, but at this time this will be a good start.
You need to first set up an account with Threema which will grant you access to your Threema 8 character User ID (which starts with an asterix (
*
). e.g*THREEMA
Account Setup
Syntax
Valid syntax is as follows:
threema://{gateway_id}@{secret}/{user}
threema://{gateway_id}@{secret}/{user1}/{user2}/{user3}/{userN}
threema://{gateway_id}@{secret}/{email}
threema://{gateway_id}@{secret}/{email1}/{email2}/{email3}/{emailN}
threema://{gateway_id}@{secret}/{phone}
threema://{gateway_id}@{secret}/{phone1}/{phone2}/{phone3}/{phoneN}
You can freely mix/match the variables as well:
threema://{gateway_id}@{secret}/{phone1}/{user1}/{email1}/...
Parameter Breakdown
+
. You may use?from=
(orgwid
) as an alias to this variable. These usually start with an asterisk (*
) such as*MYGWYID
?secret=
as an alias to this variable.?to=
as an alias to this variable.New Service Completion Status
%global common_description
Checklist
flake8
)Testing
Anyone can help test this source code as follows: