summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-07-27 06:59:19 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-07-27 06:59:19 +0300
commit16ccf8b50b8e82ec258496d6d04c2851eaa10ca2 (patch)
treee25c1ea0d98c3ecfca60d05e4c806821fd9c0e13
parent015194e4a10e6ce698234181933aff2080c1be96 (diff)
GmCerts: Use Gemini identities for Titan URLs
The upload dialog needs to have some UI for displaying/selecting which identity is used for the upload.
-rw-r--r--src/gmcerts.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gmcerts.c b/src/gmcerts.c
index 3db820fb..902576f3 100644
--- a/src/gmcerts.c
+++ b/src/gmcerts.c
@@ -551,6 +551,13 @@ const iGmIdentity *constIdentity_GmCerts(const iGmCerts *d, unsigned int id) {
551} 551}
552 552
553const iGmIdentity *identityForUrl_GmCerts(const iGmCerts *d, const iString *url) { 553const iGmIdentity *identityForUrl_GmCerts(const iGmCerts *d, const iString *url) {
554 /* Titan URLs use the Gemini identities. */
555 if (startsWithCase_String(url, "titan://")) {
556 iString *mod = copy_String(url);
557 remove_Block(&mod->chars, 0, 5);
558 prependCStr_String(mod, "gemini");
559 url = collect_String(mod);
560 }
554 lock_Mutex(d->mtx); 561 lock_Mutex(d->mtx);
555 const iGmIdentity *found = NULL; 562 const iGmIdentity *found = NULL;
556 iConstForEach(PtrArray, i, &d->idents) { 563 iConstForEach(PtrArray, i, &d->idents) {