diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 279e3bc4e..c44e91c17 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -160,6 +160,10 @@ PR titles should follow the format below: 4. *types* other than `fix:` and `feat:` are allowed, for example **[@commitlint/config-conventional](https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/config-conventional)** (based on the **[the Angular convention](https://github.com/angular/angular/blob/22b96b9/CONTRIBUTING.md#-commit-message-guidelines)**) recommends `build:`, `chore:`, `ci:`, `docs:`, `style:`, `refactor:`, `perf:`, `test:`, and others. 5. *footers* other than `BREAKING CHANGE: ` may be provided and follow a convention similar to **[git trailer format](https://git-scm.com/docs/git-interpret-trailers)**. +### CHANGELOG.md Updates 📝 + +After making changes, please ensure you update the `CHANGELOG.md` file located in the root of each package you modified. + ### Testing At Stream, we value testing. Every PR should include passing tests for existing and new features. To run our test suite locally, you can use the following *Melos* command: @@ -169,12 +173,6 @@ At Stream, we value testing. Every PR should include passing tests for existing > melos run test:flutter ``` -### Our Process - -By default, our development branch is `develop`. Contributors should create new PRs based on `develop` when working on new features. - -Develop is merged into master after the team performs various automated and QA tests on the branch. Master can be considered our stable branch, it represents the latest published release on pub.dev. - --- # Versioning Policy diff --git a/packages/stream_chat_flutter/CHANGELOG.md b/packages/stream_chat_flutter/CHANGELOG.md index 76817a689..90ac04288 100644 --- a/packages/stream_chat_flutter/CHANGELOG.md +++ b/packages/stream_chat_flutter/CHANGELOG.md @@ -1,3 +1,9 @@ +## Upcoming + +🐞 Fixed + +- Fixed mistakenly passing the hyperlink text to the `onLinkTap` callback instead of the actual `href`. + ## 9.19.0 ✅ Added diff --git a/packages/stream_chat_flutter/lib/src/message_widget/message_text.dart b/packages/stream_chat_flutter/lib/src/message_widget/message_text.dart index a092f34f7..e46e4fc42 100644 --- a/packages/stream_chat_flutter/lib/src/message_widget/message_text.dart +++ b/packages/stream_chat_flutter/lib/src/message_widget/message_text.dart @@ -47,23 +47,23 @@ class StreamMessageText extends StatelessWidget { messageTheme: messageTheme, selectable: isDesktopDeviceOrWeb, onTapLink: ( - String link, + String text, String? href, String title, ) { - if (link.startsWith('@')) { + if (text.startsWith('@')) { final mentionedUser = message.mentionedUsers.firstWhereOrNull( - (u) => '@${u.name}' == link, + (u) => '@${u.name}' == text, ); if (mentionedUser == null) return; onMentionTap?.call(mentionedUser); - } else { + } else if (href != null) { if (onLinkTap != null) { - onLinkTap!(link); + onLinkTap!(href); } else { - launchURL(context, link); + launchURL(context, href); } } },