Skip to content

Commit

Permalink
updated regex for enriching urls (#2024)
Browse files Browse the repository at this point in the history
  • Loading branch information
deven98 authored Sep 17, 2024
1 parent 06398a4 commit 9bdf928
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions packages/stream_chat_flutter/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
## Upcoming

🐞 Fixed

- Fixed enrichment errors causing some URLs to enrich twice.
- Added option to use the native attachment picker on mobile

## 8.0.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1139,7 +1139,7 @@ class StreamMessageInputState extends State<StreamMessageInput>
String? _lastSearchedContainsUrlText;
CancelableOperation? _enrichUrlOperation;
final _urlRegex = RegExp(
r'(?:(?:https?|ftp):\/\/)?[\w/\-?=%.]+\.[\w/\-?=%.]+',
r'https?://(www\.)?[-a-zA-Z0-9@:%._+~#=]{2,256}\.[a-z]{2,4}\b([-a-zA-Z0-9@:%_+.~#?&//=]*)',
caseSensitive: false,
);

Expand Down

0 comments on commit 9bdf928

Please sign in to comment.