feat: favorite message

This commit is contained in:
zerosoul
2022-04-29 17:17:07 +08:00
parent 9639073f31
commit 0e2d5b9fde
20 changed files with 708 additions and 171 deletions
+6 -4
View File
@@ -103,7 +103,7 @@ export default function FileMessage({
if (!properties) return null;
const icon = getFileIcon(content_type, name);
if (!content || !fromUser || !name) return null;
if (!content || !name) return null;
console.log("file content", content, name, content_type, size);
const sending = uploadingFile || isSending;
@@ -134,9 +134,11 @@ export default function FileMessage({
<>
<i className="size">{formatBytes(size)}</i>
<i className="time">{dayjs(created_at).fromNow()}</i>
<i className="from">
by <strong>{fromUser.name}</strong>
</i>
{fromUser && (
<i className="from">
by <strong>{fromUser.name}</strong>
</i>
)}
</>
)}
</span>