mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-12-01 00:39:34 +01:00
Merge branch 'td/fix_pill' into 'main'
fix: cast error in html messages Closes #808 See merge request famedly/fluffychat!703
This commit is contained in:
commit
0a6afa9da4
@ -95,7 +95,7 @@ class HtmlMessage extends StatelessWidget {
|
|||||||
final identityParts = url.parseIdentifierIntoParts();
|
final identityParts = url.parseIdentifierIntoParts();
|
||||||
final identifier = identityParts?.primaryIdentifier;
|
final identifier = identityParts?.primaryIdentifier;
|
||||||
if (identifier == null) {
|
if (identifier == null) {
|
||||||
return null;
|
return {'': null};
|
||||||
}
|
}
|
||||||
if (identifier.sigil == '@') {
|
if (identifier.sigil == '@') {
|
||||||
// we have a user pill
|
// we have a user pill
|
||||||
@ -127,13 +127,13 @@ class HtmlMessage extends StatelessWidget {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return {'': null};
|
||||||
}
|
}
|
||||||
if (identifier.sigil == '!') {
|
if (identifier.sigil == '!') {
|
||||||
// we have a room ID pill
|
// we have a room ID pill
|
||||||
final r = room.client.getRoomById(identifier);
|
final r = room.client.getRoomById(identifier);
|
||||||
if (r == null) {
|
if (r == null) {
|
||||||
return null;
|
return {'': null};
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
'displayname':
|
'displayname':
|
||||||
@ -141,8 +141,8 @@ class HtmlMessage extends StatelessWidget {
|
|||||||
'avatar_url': r.getState('m.room.avatar')?.content['url'],
|
'avatar_url': r.getState('m.room.avatar')?.content['url'],
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
return null;
|
return {'': null};
|
||||||
} as Future<Map<String, dynamic>> Function(String)?,
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user