fix(service): Fix crash if a sign out happened
This commit is contained in:
parent
72501bd0b3
commit
f0e68f7b48
@ -37,9 +37,11 @@ class XmppState with _$XmppState {
|
||||
|
||||
factory XmppState.fromDatabaseTuples(Map<String, String?> tuples) {
|
||||
final smStateString = tuples['smState'];
|
||||
|
||||
final isSmStateNotNull = smStateString != null && smStateString != 'null';
|
||||
final json = <String, dynamic>{
|
||||
'smState': smStateString != null ? jsonDecode(smStateString) as Map<String, dynamic> : null,
|
||||
'smState': isSmStateNotNull ?
|
||||
jsonDecode(smStateString) as Map<String, dynamic> :
|
||||
null,
|
||||
'srid': tuples['srid'],
|
||||
'resource': tuples['resource'],
|
||||
'jid': tuples['jid'],
|
||||
|
Loading…
Reference in New Issue
Block a user