fix(ui): use ogScrapeUrl for link attachments

This commit is contained in:
Salvatore Giordano
2022-04-26 11:53:58 +02:00
parent 76f6ce6d0f
commit ff028948cf
8 changed files with 28 additions and 22 deletions
@@ -225,3 +225,12 @@ extension UserListX on List<User> {
return entries.map((e) => e.key).toList(growable: false);
}
}
/// Extensions on [Uri]
extension UriX on Uri {
/// Return the URI adding the http scheme if it is missing
Uri get withScheme {
if (hasScheme) return this;
return Uri.parse('http://${toString()}');
}
}