Implement Telegram support #24

Merged
yarmo merged 5 commits from Goldstein/doipjs:telegram into main 2 months ago
Forum discussion: https://community.keyoxide.org/d/34-add-telegram/29
Goldstein added 1 commit 2 months ago
8466ef934e
Implement Telegram support
Goldstein added 1 commit 2 months ago
cbeefbc909
clickable links
yarmo requested changes 2 months ago
/*
Copyright 2021 Yarmo Mackenbach
Owner

Feel free to change the year and replace with your name or pseudonym

Feel free to change the year and replace with your name or pseudonym
Goldstein marked this conversation as resolved
*/
const E = require('../enums')
const reURI = /https:\/\/t.me\/([A-Za-z0-9_]{5,32})\?user=([A-Za-z0-9_]{5,32})/
Owner

Nice precise regex. Do you have a link to official documentation that shows the {5,32} requirement?

Nice precise regex. Do you have a link to official documentation that shows the `{5,32}` requirement?
Poster
Yes, I do. https://core.telegram.org/method/account.checkUsername
yarmo marked this conversation as resolved
}
},
claim: {
format: E.ClaimFormat.FINGERPRINT,
Owner

Whenever possible, we should aim to use the URI claim format as it provides slightly more information about the fingerprint. Once we start supporting non-OpenPGP cryptography, we wouldn't want people to abuse fingerprint collisions.

The description should then become: openpgp4fpr:9f0048ac0b23301e1f77e994909f6bd6f80f485d

Whenever possible, we should aim to use the URI claim format as it provides slightly more information about the fingerprint. Once we start supporting non-OpenPGP cryptography, we wouldn't want people to abuse fingerprint collisions. The description should then become: `openpgp4fpr:9f0048ac0b23301e1f77e994909f6bd6f80f485d`
Poster

Changed it to URI.

Changed it to URI.
Goldstein marked this conversation as resolved
/*
Copyright 2021 Yarmo Mackenbach
Owner

Feel free to change the year and replace with your name or pseudonym

Feel free to change the year and replace with your name or pseudonym
Poster

Thanks, changed it.

Thanks, changed it.
Goldstein marked this conversation as resolved
Goldstein added 1 commit 2 months ago
9d3b8f8508
change proof format
Goldstein added 1 commit 2 months ago
5ecdcd0061
update one more copyright
yarmo requested changes 2 months ago
profile: {
display: `@${match[1]}`,
uri: `https://t.me/${match[1]}`,
qr: null
Owner

Telegram supports QR, so the Keyoxide UI can display them as well: https://t.me/${match[1]}

Telegram supports QR, so the Keyoxide UI can display them as well: `https://t.me/${match[1]}`
Goldstein marked this conversation as resolved
qr: null
},
proof: {
uri: null,
Owner

We can actually change this to https://t.me/${match[2]}, since this will be the proof's URL.

(Excuses that this is not obvious and undocumented. One of the priorities for the rewrite at some point in the near future)

We can actually change this to `https://t.me/${match[2]}`, since this will be the proof's URL. (Excuses that this is not obvious and undocumented. One of the priorities for the rewrite at some point in the near future)
Goldstein marked this conversation as resolved
Goldstein added 1 commit 2 months ago
49050d55d2
add more Telegram URIs
Owner

Great PR 🚀 thanks a bunch!

Great PR :rocket: thanks a bunch!
yarmo merged commit c0cf0f2767 into main 2 months ago
Goldstein deleted branch telegram 2 months ago

Reviewers

yarmo requested changes 2 months ago
continuous-integration/drone/pr Build is passing
The pull request has been merged as c0cf0f2767.
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: keyoxide/doipjs#24
Loading…
There is no content yet.