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) {
|
factory XmppState.fromDatabaseTuples(Map<String, String?> tuples) {
|
||||||
final smStateString = tuples['smState'];
|
final smStateString = tuples['smState'];
|
||||||
|
final isSmStateNotNull = smStateString != null && smStateString != 'null';
|
||||||
final json = <String, dynamic>{
|
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'],
|
'srid': tuples['srid'],
|
||||||
'resource': tuples['resource'],
|
'resource': tuples['resource'],
|
||||||
'jid': tuples['jid'],
|
'jid': tuples['jid'],
|
||||||
|
Loading…
Reference in New Issue
Block a user