forked from Henry-Hiles/nexus
Add more info to comment
This commit is contained in:
parent
657883436f
commit
7d4832895d
1 changed files with 2 additions and 7 deletions
|
|
@ -1,6 +1,5 @@
|
||||||
import "package:flutter/foundation.dart";
|
import "package:flutter/foundation.dart";
|
||||||
import "package:flutter_chat_core/flutter_chat_core.dart";
|
import "package:flutter_chat_core/flutter_chat_core.dart";
|
||||||
import "package:flutter_link_previewer/flutter_link_previewer.dart";
|
|
||||||
import "package:matrix/matrix.dart";
|
import "package:matrix/matrix.dart";
|
||||||
|
|
||||||
extension EventToMessage on Event {
|
extension EventToMessage on Event {
|
||||||
|
|
@ -32,11 +31,7 @@ extension EventToMessage on Event {
|
||||||
|
|
||||||
if (redacted && !mustBeText) return null;
|
if (redacted && !mustBeText) return null;
|
||||||
|
|
||||||
// TODO: Why does the SDK not return og:title and og:description?
|
// TODO: Use server-generated preview if enabled when https://github.com/famedly/matrix-dart-sdk/issues/2195 is fixed.
|
||||||
// TODO: It's maybe because spec isn't clear on this, the example
|
|
||||||
// TODO: has all the info we need, but the table only shows
|
|
||||||
// TODO: `matrix:image:size` and `og:image`, the same as the SDK
|
|
||||||
// TODO: returns. I could maybe PR a fix to the SDK.
|
|
||||||
|
|
||||||
// final match = Uri.tryParse(
|
// final match = Uri.tryParse(
|
||||||
// RegExp(regexLink, caseSensitive: false).firstMatch(body)?.group(0) ?? "",
|
// RegExp(regexLink, caseSensitive: false).firstMatch(body)?.group(0) ?? "",
|
||||||
|
|
@ -44,7 +39,7 @@ extension EventToMessage on Event {
|
||||||
|
|
||||||
// final preview = match == null
|
// final preview = match == null
|
||||||
// ? null
|
// ? null
|
||||||
// : await room.client.getUrlPreviewAuthed(match);
|
// : await room.client.getUrlPreview(match);
|
||||||
|
|
||||||
final asText =
|
final asText =
|
||||||
Message.text(
|
Message.text(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue