fix: mxid validation
This commit is contained in:
parent
57ae277331
commit
857566b56e
2 changed files with 9 additions and 8 deletions
|
|
@ -99,11 +99,10 @@ class _InvitationSelectionState extends State<InvitationSelection> {
|
|||
}
|
||||
setState(() {
|
||||
foundProfiles = List<Profile>.from(response.results);
|
||||
if ('@$text'.isValidMatrixId &&
|
||||
foundProfiles.indexWhere((profile) => '@$text' == profile.userId) ==
|
||||
-1) {
|
||||
if (text.isValidMatrixId &&
|
||||
foundProfiles.indexWhere((profile) => text == profile.userId) == -1) {
|
||||
setState(() => foundProfiles = [
|
||||
Profile.fromJson({'user_id': '@$text'}),
|
||||
Profile.fromJson({'user_id': text}),
|
||||
]);
|
||||
}
|
||||
final participants = room
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue