channel query on local notification was using event.type
This commit is contained in:
@@ -69,8 +69,7 @@ void main() async {
|
||||
final client = Client(
|
||||
's2dxdhpxd94g',
|
||||
logLevel: Level.INFO,
|
||||
showLocalNotification:
|
||||
(!kIsWeb && Platform.isAndroid) ? showLocalNotification : null,
|
||||
showLocalNotification: (m, c) {},
|
||||
persistenceEnabled: true,
|
||||
);
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
name: example
|
||||
description: A new Flutter project.
|
||||
version: 1.0.22+23
|
||||
version: 1.0.23+24
|
||||
|
||||
environment:
|
||||
sdk: ">=2.2.2 <3.0.0"
|
||||
|
||||
@@ -186,10 +186,10 @@ class StreamChatState extends State<StreamChat> with WidgetsBindingObserver {
|
||||
.listen((event) async {
|
||||
var channel = client.state.channels[event.cid];
|
||||
|
||||
if (channel == null) {
|
||||
if (channel != null) {
|
||||
channel = client.channel(
|
||||
event.type,
|
||||
id: event.cid.split(':')[1],
|
||||
event.channelType,
|
||||
id: event.channelId,
|
||||
);
|
||||
await channel.query();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user