Allow Tor Caching + Our Own Linkify #316

Merged
erinn merged 7 commits from torcache into trunk 2022-01-18 23:06:25 +00:00
Owner
No description provided.
erinn was assigned by sarah 2022-01-18 21:18:38 +00:00
sarah added 1 commit 2022-01-18 21:18:39 +00:00
continuous-integration/drone/pr Build is pending Details
c6e64a3a5f
Allow Tor Caching + Our Own Linkify
sarah added 1 commit 2022-01-18 21:47:59 +00:00
continuous-integration/drone/pr Build is passing Details
b3f06d6765
Update lcg
sarah changed title from WIP: Allow Tor Caching + Our Own Linkify to Allow Tor Caching + Our Own Linkify 2022-01-18 21:48:14 +00:00
Member
Drone Build Status: success https://build.openprivacy.ca/cwtch.im/cwtch-ui/473
erinn requested changes 2022-01-18 22:21:01 +00:00
erinn left a comment
Owner

ultimately i'm not sure what this is supposed to do or why it's better... if the goal is just "don't change the user's text" then the whole match.group(2) parsing section can just be replaced with list.add(TextElement(match.group(2)!));

ultimately i'm not sure what this is supposed to do or why it's better... if the goal is just "don't change the user's text" then the whole `match.group(2)` parsing section can just be replaced with `list.add(TextElement(match.group(2)!));`
@ -0,0 +1,380 @@
//
// Code Originally taken from https://github.com/Cretezy/flutter_linkify/ and
Owner

add current git commit to this link

add current git commit to this link
@ -0,0 +1,380 @@
//
// Code Originally taken from https://github.com/Cretezy/flutter_linkify/ and
// subsequently modified...
Owner

you told me this wasn't modified

you told me this wasn't modified
@ -0,0 +2,4 @@
// Code Originally taken from https://github.com/Cretezy/flutter_linkify/ and
// subsequently modified...
// Original License for this code:
// MIT License
Owner

needs to be added to licenses.dart

needs to be added to `licenses.dart`
@ -0,0 +1,128 @@
// Originally from linkify
Owner

needs a link with git commit

needs a link with git commit
@ -0,0 +1,128 @@
// Originally from linkify
// MIT License
Owner

also needs to be added to licenses.dart

also needs to be added to `licenses.dart`
@ -0,0 +1,127 @@
// Originally from linkify
Owner

needs a link (with git commit) and a "was modified". inline comments should also probably call out which changes are from us

needs a link (with git commit) and a "was modified". inline comments should also probably call out which changes are from us
@ -0,0 +74,4 @@
var url = originalUrl;
// We do not, ever, change the original text of a message.
Owner

code disagrees with the comment

code disagrees with the comment
@ -0,0 +76,4 @@
// We do not, ever, change the original text of a message.
if (options.defaultToHttps) {
url = url.replaceFirst('http://', 'https://');
Owner

why remove if (!originalUrl.startsWith...? this breaks URIs like eg https://example.com/http://. also doesn't make sense to me to change explicit http:// to https:// if the user is the one that originally wrote it

why remove `if (!originalUrl.startsWith...`? this breaks URIs like eg `https://example.com/http://`. also doesn't make sense to me to change explicit `http://` to `https://` if the user is the one that originally wrote it
sarah marked this conversation as resolved
@ -0,0 +82,4 @@
// These options are intended for the human-readable portion of
// the URI
if (options.humanize) {
originalUrl = originalUrl.replaceFirst(RegExp(r'https?://'), '');
Owner

changing the text but not changing the underlying URL?

changing the text but not changing the underlying URL?
sarah marked this conversation as resolved
@ -0,0 +86,4 @@
}
if (options.removeWww) {
originalUrl = originalUrl.replaceFirst(RegExp(r'www\.'), '');
Owner

same but worse. link shown to the user could now go to a different place than the underlying URL. also breaks https://example.com/www.html

same but worse. link shown to the user could now go to a different place than the underlying URL. also breaks `https://example.com/www.html`
sarah marked this conversation as resolved
@ -3,1 +3,4 @@
import 'package:cwtch/models/message.dart';
import 'package:cwtch/third_party/linkify/flutter_linkify.dart';
import 'package:cwtch/third_party/linkify/linkify.dart';
import 'package:cwtch/third_party/linkify/uri.dart';
Owner

can't these be combined into one import?

can't these be combined into one import?
sarah added 1 commit 2022-01-18 22:33:05 +00:00
continuous-integration/drone/pr Build is pending Details
cd1bf07fba
Responding to @errorinn PR Comments
sarah added 1 commit 2022-01-18 22:44:08 +00:00
continuous-integration/drone/pr Build is pending Details
303b70d751
Fixup displayed link + add linkify to licenses.dart
sarah added 1 commit 2022-01-18 22:44:25 +00:00
continuous-integration/drone/pr Build is pending Details
da3234e3e4
Formatting
sarah added 1 commit 2022-01-18 22:48:29 +00:00
continuous-integration/drone/pr Build is passing Details
1700306c78
Link to specific commit hashes
erinn approved these changes 2022-01-18 22:53:49 +00:00
erinn left a comment
Owner

approved with sadness

approved with sadness
Member
Drone Build Status: success https://build.openprivacy.ca/cwtch.im/cwtch-ui/477
sarah added 1 commit 2022-01-18 23:04:05 +00:00
continuous-integration/drone/pr Build is pending Details
ca44fd798c
Show tooltip for links
erinn approved these changes 2022-01-18 23:06:17 +00:00
erinn merged commit e99fc45a28 into trunk 2022-01-18 23:06:25 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: cwtch.im/cwtch-ui#316
No description provided.