Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions packages/stream_chat/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## Upcoming

🐞 Fixed

- Fixed user's ID from being inadvertently used as their display name during the WebSocket
connection process. [[#2447]](https://github.com/GetStream/stream-chat-flutter/issues/2447)

## 9.20.0

✅ Added
Expand Down
4 changes: 3 additions & 1 deletion packages/stream_chat/lib/src/ws/connect_user_details.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import 'package:json_annotation/json_annotation.dart';
import 'package:stream_chat/src/core/models/own_user.dart';
import 'package:stream_chat/src/core/models/privacy_settings.dart';
import 'package:stream_chat/src/core/util/extension.dart';
import 'package:stream_chat/src/core/util/serializer.dart';

part 'connect_user_details.g.dart';
Expand Down Expand Up @@ -35,7 +36,8 @@ class ConnectUserDetails {
factory ConnectUserDetails.fromOwnUser(OwnUser user) {
return ConnectUserDetails(
id: user.id,
name: user.name,
// Using extraData value in order to not use id as name.
name: user.extraData['name'].safeCast<String>(),
image: user.image,
language: user.language,
invisible: user.invisible,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ class StreamImageAttachmentThumbnail extends StatelessWidget {

// If the remote image URL is available, we can directly show it using
// the _RemoteImageAttachment widget.
if (image.thumbUrl ?? image.imageUrl case final imageUrl?) {
final imageUrl = image.thumbUrl ?? image.imageUrl ?? image.assetUrl;
if (imageUrl case final imageUrl?) {
var resizedImageUrl = imageUrl;
if (effectiveThumbnailSize case final thumbnailSize?) {
resizedImageUrl = imageUrl.getResizedImageUrl(
Expand Down
Loading