Skip to content

Commit

Permalink
Merge pull request #1584 from GetStream/release/v6.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
xsahil03x authored Jun 2, 2023
2 parents 13dce4d + 67f9a62 commit c307ee8
Show file tree
Hide file tree
Showing 90 changed files with 635 additions and 480 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dart_code_metrics.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Dart Code Metrics

env:
flutter_version: "3.7.0"
flutter_version: "3.10.0"
folders: "lib, test"

on:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stream_flutter_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: stream_flutter_workflow

env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
flutter_version: "3.7.0"
flutter_version: "3.10.0"

on:
pull_request:
Expand Down
16 changes: 16 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Reporting a Vulnerability
At Stream we are committed to the security of our Software. We appreciate your efforts in disclosing vulnerabilities responsibly and we will make every effort to acknowledge your contributions.

Report security vulnerabilities at the following email address:
```
[[email protected]](mailto:[email protected])
```
Alternatively it is also possible to open a new issue in the affected repository, tagging it with the `security` tag.

A team member will acknowledge the vulnerability and will follow-up with more detailed information. A representative of the security team will be in touch if more information is needed.

# Information to include in a report
While we appreciate any information that you are willing to provide, please make sure to include the following:
* Which repository is affected
* Which branch, if relevant
* Be as descriptive as possible, the team will replicate the vulnerability before working on a fix.
4 changes: 2 additions & 2 deletions melos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ scripts:
- Note: you can also rely on your IDEs Dart Analysis / Issues window.
format:
run: flutter format --set-exit-if-changed .
run: dart format --set-exit-if-changed .
description: |
Run `flutter format --set-exit-if-changed .` in all packages.
Run `dart format --set-exit-if-changed .` in all packages.
metrics:
run: |
Expand Down
11 changes: 11 additions & 0 deletions packages/stream_chat/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
## 6.2.0

🐞 Fixed

- [[#1422]](https://github.com/GetStream/stream-chat-flutter/issues/1422) Fixed `User.createdAt` property using
currentTime when the ws connection is not established.

✅ Added

- Added support for `ChatPersistenceClient.isConnected` for checking if the client is connected to the database.

## 6.1.0

🐞 Fixed
Expand Down
11 changes: 5 additions & 6 deletions packages/stream_chat/lib/src/core/models/user.dart
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,16 @@ class User extends Equatable {
this.role,
String? name,
String? image,
DateTime? createdAt,
DateTime? updatedAt,
this.createdAt,
this.updatedAt,
this.lastActive,
Map<String, Object?> extraData = const {},
this.online = false,
this.banned = false,
this.banExpires,
this.teams = const [],
this.language,
}) : createdAt = createdAt ?? DateTime.now(),
updatedAt = updatedAt ?? DateTime.now(),
}) :
// For backwards compatibility, set 'name', 'image' in [extraData].
extraData = {
...extraData,
Expand Down Expand Up @@ -104,11 +103,11 @@ class User extends Equatable {

/// Date of user creation.
@JsonKey(includeToJson: false)
final DateTime createdAt;
final DateTime? createdAt;

/// Date of last user update.
@JsonKey(includeToJson: false)
final DateTime updatedAt;
final DateTime? updatedAt;

/// Date of last user connection.
@JsonKey(includeToJson: false)
Expand Down
3 changes: 3 additions & 0 deletions packages/stream_chat/lib/src/db/chat_persistence_client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ import 'package:stream_chat/src/core/util/extension.dart';

/// A simple client used for persisting chat data locally.
abstract class ChatPersistenceClient {
/// Whether the connection is established.
bool get isConnected;

/// Creates a new connection to the client
Future<void> connect(String userId);

Expand Down
2 changes: 1 addition & 1 deletion packages/stream_chat/lib/version.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ import 'package:stream_chat/src/client/client.dart';
/// Current package version
/// Used in [StreamChatClient] to build the `x-stream-client` header
// ignore: constant_identifier_names
const PACKAGE_VERSION = '6.1.0';
const PACKAGE_VERSION = '6.2.0';
2 changes: 1 addition & 1 deletion packages/stream_chat/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: stream_chat
homepage: https://getstream.io/
description: The official Dart client for Stream Chat, a service for building chat applications.
version: 6.1.0
version: 6.2.0
repository: https://github.com/GetStream/stream-chat-flutter
issue_tracker: https://github.com/GetStream/stream-chat-flutter/issues

Expand Down
8 changes: 4 additions & 4 deletions packages/stream_chat/test/src/core/models/user_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,8 @@ void main() {
expect(user.banned, false);
expect(user.teams, []);
expect(user.lastActive, null);
expect(user.createdAt, isNotNull);
expect(user.updatedAt, isNotNull);
expect(user.createdAt, null);
expect(user.updatedAt, null);
});

test('default values, parse json', () {
Expand All @@ -214,8 +214,8 @@ void main() {
expect(user.banned, false);
expect(user.teams, []);
expect(user.lastActive, null);
expect(user.createdAt, isNotNull);
expect(user.updatedAt, isNotNull);
expect(user.createdAt, null);
expect(user.updatedAt, null);
});
});
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ import 'package:stream_chat/src/db/chat_persistence_client.dart';
import 'package:test/test.dart';

class TestPersistenceClient extends ChatPersistenceClient {
@override
bool get isConnected => throw UnimplementedError();

@override
Future<void> connect(String userId) => throw UnimplementedError();

Expand Down
40 changes: 40 additions & 0 deletions packages/stream_chat_flutter/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,43 @@
## 6.2.0

🐞 Fixed

- [[#1546]](https://github.com/GetStream/stream-chat-flutter/issues/1546)
Fixed `StreamMessageInputTheme.linkHighlightColor` returning null for default theme.
- [[#1548]](https://github.com/GetStream/stream-chat-flutter/issues/1548) Fixed `StreamMessageInput` urlRegex only
matching the lowercase `http(s)|ftp`.
- [[#1542]](https://github.com/GetStream/stream-chat-flutter/issues/1542) Handle error thrown in `StreamMessageInput`
when unable to fetch a link preview.
- [[#1540]](https://github.com/GetStream/stream-chat-flutter/issues/1540) Use `CircularProgressIndicator.adaptive`
instead of material indicator.
- [[#1490]](https://github.com/GetStream/stream-chat-flutter/issues/1490) Fixed `editMessageInputBuilder` property not
used in `MessageActionsModal.editMessage` option.
- [[#1544]](https://github.com/GetStream/stream-chat-flutter/issues/1544) Fixed error thrown when unable to fetch
image/data in Message link preview.
- [[#1482]](https://github.com/GetStream/stream-chat-flutter/issues/1482) Fixed `StreaChannelListTile` not showing
unread indicator when `currentUser` is not present in the initial member list.
- [[#1487]](https://github.com/GetStream/stream-chat-flutter/issues/1487) Use localized title
for `WebOrDesktopAttachmentPickerOption` in `StreamMessageInput`.
- [[#1250]](https://github.com/GetStream/stream-chat-flutter/issues/1250) Fixed bottomRow widgetSpans getting resized
twice when `textScaling` is enabled.
- [[#1498]](https://github.com/GetStream/stream-chat-flutter/issues/1498) Fixed `MessageInput` autocomplete not working
on non-mobile platforms.
- [[#1576]](https://github.com/GetStream/stream-chat-flutter/issues/1576) Temporary fix for `StreamMessageListView`
getting broken when loaded at a particular message and a new message is added.

✅ Added

- Added support for `StreamMessageThemeData.urlAttachmentTextMaxLine` to specify the `.maxLines` for the url attachment
text. [#1543](https://github.com/GetStream/stream-chat-flutter/issues/1543)

🔄 Changed

- Updated `shimmer` dependency to `^3.0.0`.
- Updated `image_gallery_saver` dependency to `^2.0.1`.
- Deprecated `ChannelPreview` in favor of `StreamChannelListTile`.
- Updated `stream_chat_flutter_core` dependency
to [`6.2.0`](https://pub.dev/packages/stream_chat_flutter_core/changelog).

## 6.1.0

🐞 Fixed
Expand Down
2 changes: 1 addition & 1 deletion packages/stream_chat_flutter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ import 'package:stream_chat_persistence/stream_chat_persistence.dart';
final chatPersistentClient = StreamChatPersistenceClient(
logLevel: Level.INFO,
connectionMode: ConnectionMode.background,
connectionMode: ConnectionMode.regular,
);
final client = StreamChatClient(
Expand Down
6 changes: 3 additions & 3 deletions packages/stream_chat_flutter/example/lib/split_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,12 @@ class ChannelPage extends StatelessWidget {
@override
Widget build(BuildContext context) => Navigator(
onGenerateRoute: (settings) => MaterialPageRoute(
builder: (context) => Scaffold(
appBar: const StreamChannelHeader(
builder: (context) => const Scaffold(
appBar: StreamChannelHeader(
showBackButton: false,
),
body: Column(
children: const <Widget>[
children: <Widget>[
Expanded(
child: StreamMessageListView(),
),
Expand Down
6 changes: 3 additions & 3 deletions packages/stream_chat_flutter/example/lib/tutorial_part_1.dart
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,10 @@ class ChannelPage extends StatelessWidget {
@override
// ignore: prefer_expression_function_bodies
Widget build(BuildContext context) {
return Scaffold(
appBar: const StreamChannelHeader(),
return const Scaffold(
appBar: StreamChannelHeader(),
body: Column(
children: const <Widget>[
children: <Widget>[
Expanded(
child: StreamMessageListView(),
),
Expand Down
6 changes: 3 additions & 3 deletions packages/stream_chat_flutter/example/lib/tutorial_part_2.dart
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,10 @@ class ChannelPage extends StatelessWidget {

@override
Widget build(BuildContext context) {
return Scaffold(
appBar: const StreamChannelHeader(),
return const Scaffold(
appBar: StreamChannelHeader(),
body: Column(
children: const <Widget>[
children: <Widget>[
Expanded(
child: StreamMessageListView(),
),
Expand Down
6 changes: 3 additions & 3 deletions packages/stream_chat_flutter/example/lib/tutorial_part_3.dart
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,10 @@ class ChannelPage extends StatelessWidget {

@override
Widget build(BuildContext context) {
return Scaffold(
appBar: const StreamChannelHeader(),
return const Scaffold(
appBar: StreamChannelHeader(),
body: Column(
children: const <Widget>[
children: <Widget>[
Expanded(
child: StreamMessageListView(),
),
Expand Down
2 changes: 1 addition & 1 deletion packages/stream_chat_flutter/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ dependencies:
cupertino_icons: ^1.0.4
flutter:
sdk: flutter
responsive_builder: ^0.6.4
responsive_builder: ^0.7.0
stream_chat_flutter:
path: ../
stream_chat_localizations:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ class _FileTypeImage extends StatelessWidget {
child: SizedBox(
width: 20,
height: 20,
child: CircularProgressIndicator(),
child: CircularProgressIndicator.adaptive(),
),
),
),
Expand All @@ -210,7 +210,7 @@ class _FileTypeImage extends StatelessWidget {
child: SizedBox(
width: 20,
height: 20,
child: CircularProgressIndicator(),
child: CircularProgressIndicator.adaptive(),
),
),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ class StreamGiphyAttachment extends StreamAttachmentWidget {
color: StreamChatTheme.of(context).colorTheme.barsBg,
elevation: 2,
clipBehavior: Clip.hardEdge,
margin: EdgeInsets.zero,
shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.only(
topRight: Radius.circular(16),
Expand Down Expand Up @@ -115,7 +116,7 @@ class StreamGiphyAttachment extends StreamAttachmentWidget {
width: constraints?.maxHeight,
height: constraints?.maxWidth,
child: const Center(
child: CircularProgressIndicator(),
child: CircularProgressIndicator.adaptive(),
),
),
imageUrl: imageUrl,
Expand Down Expand Up @@ -241,10 +242,7 @@ class StreamGiphyAttachment extends StreamAttachmentWidget {
const SizedBox(height: 4),
const Align(
alignment: Alignment.centerRight,
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 8, vertical: 4),
child: StreamVisibleFootnote(),
),
child: StreamVisibleFootnote(),
),
],
),
Expand Down
Loading

0 comments on commit c307ee8

Please sign in to comment.