mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-11-22 14:18:32 +03:00
removed fallback for setting post content_type, made pollmeta a partial extension
This commit is contained in:
parent
0122f0e8bb
commit
b5312b3475
@ -1,5 +1,4 @@
|
|||||||
export enum ContentType {
|
export enum ContentType {
|
||||||
GENERAL = 'general',
|
|
||||||
POLL = 'poll',
|
POLL = 'poll',
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -26,11 +25,10 @@ export interface PollMetadata {
|
|||||||
hide_votes: boolean;
|
hide_votes: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface PostMetadata extends PollMetadata {
|
export interface PostMetadata extends Partial<PollMetadata> {
|
||||||
// GENERAL
|
// GENERAL
|
||||||
tags: string[];
|
tags: string[];
|
||||||
token: string;
|
token: string;
|
||||||
content_type: ContentType;
|
|
||||||
description: string;
|
description: string;
|
||||||
format: string;
|
format: string;
|
||||||
version: number;
|
version: number;
|
||||||
|
@ -246,7 +246,7 @@ export const extractMetadata = async ({
|
|||||||
// const userReg = /(^|\s)(@[a-z][-.a-z\d]+[a-z\d])/gim;
|
// const userReg = /(^|\s)(@[a-z][-.a-z\d]+[a-z\d])/gim;
|
||||||
|
|
||||||
let out: PostMetadata = {
|
let out: PostMetadata = {
|
||||||
content_type: contentType || ContentType.GENERAL,
|
content_type: contentType,
|
||||||
};
|
};
|
||||||
|
|
||||||
const mUrls = extractUrls(body);
|
const mUrls = extractUrls(body);
|
||||||
|
Loading…
Reference in New Issue
Block a user