Skip to content

Commit 4df204b

Browse files
authored
fix(backend): set creator for links and media coming from TG (#2311)
1 parent 19a2249 commit 4df204b

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

packages/@liexp/backend/src/flows/links/link.flow.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ export const fromURL =
6262
location: image,
6363
description: defaults?.title ?? m.description ?? m.url,
6464
type: ImageType.types[0].value,
65+
creator,
6566
}),
6667
creator,
6768
)(ctx),
@@ -105,7 +106,7 @@ export const fromURL =
105106
: null,
106107
createdAt: new Date(),
107108
updatedAt: new Date(),
108-
creator: null,
109+
creator: creator,
109110
provider: null,
110111
events: [],
111112
keywords: [],

packages/@liexp/backend/src/flows/media/findOneByLocationOrElse.flow.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { fp, pipe } from "@liexp/core/lib/fp/index.js";
22
import { type URL } from "@liexp/shared/lib/io/http/Common/URL.js";
33
import { uuid } from "@liexp/shared/lib/io/http/Common/UUID.js";
4+
import { ImageType } from "@liexp/shared/lib/io/http/Media/MediaType.js";
45
import { type Option } from "fp-ts/lib/Option.js";
56
import { type ReaderTaskEither } from "fp-ts/lib/ReaderTaskEither.js";
67
import { type Metadata } from "page-metadata-parser";
@@ -32,7 +33,7 @@ export const findOneByLocationOrElse =
3233
thumbnail: image,
3334
location: image,
3435
description: image,
35-
type: "image/jpeg",
36+
type: ImageType.types[1].value,
3637
createdAt: new Date(),
3738
updatedAt: new Date(),
3839
creator,

0 commit comments

Comments
 (0)