parse audio as file
This commit is contained in:
parent
93255ec748
commit
ea4c45cb94
1 changed files with 1 additions and 12 deletions
|
|
@ -140,18 +140,7 @@ class MessageController extends AsyncNotifier<Message?> {
|
||||||
deliveredAt: config.event.timestamp,
|
deliveredAt: config.event.timestamp,
|
||||||
blurhash: (content["info"] as Map?)?["xyz.amorgan.blurhash"],
|
blurhash: (content["info"] as Map?)?["xyz.amorgan.blurhash"],
|
||||||
),
|
),
|
||||||
"m.audio" => Message.audio(
|
"m.audio" || "m.file" => Message.file(
|
||||||
id: config.event.eventId,
|
|
||||||
metadata: metadata,
|
|
||||||
authorId: event.authorId,
|
|
||||||
text: content["body"],
|
|
||||||
replyToMessageId: replyId,
|
|
||||||
source: source,
|
|
||||||
deliveredAt: config.event.timestamp,
|
|
||||||
// TODO: See if we can figure out duration
|
|
||||||
duration: Duration(hours: 1),
|
|
||||||
),
|
|
||||||
"m.file" => Message.file(
|
|
||||||
name: content["filename"].toString(),
|
name: content["filename"].toString(),
|
||||||
size: content["info"]["size"],
|
size: content["info"]["size"],
|
||||||
metadata: metadata,
|
metadata: metadata,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue