mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-11-24 00:46:27 +03:00
injecting image urls and ratios in comment metadata
This commit is contained in:
parent
65b0ff5c3b
commit
8caee49a71
@ -78,7 +78,6 @@ export const usePostSubmitter = () => {
|
||||
parentPermlink,
|
||||
permlink,
|
||||
commentBody,
|
||||
[],
|
||||
jsonMetadata
|
||||
)
|
||||
|
||||
|
@ -1509,8 +1509,7 @@ export const postComment = (
|
||||
parentPermlink,
|
||||
permlink,
|
||||
body,
|
||||
parentTags,
|
||||
jsonMetadata = null,
|
||||
jsonMetadata,
|
||||
) =>
|
||||
_postContent(
|
||||
account,
|
||||
@ -1520,7 +1519,7 @@ export const postComment = (
|
||||
permlink,
|
||||
'',
|
||||
body,
|
||||
jsonMetadata ? jsonMetadata : makeJsonMetadataReply(parentTags || ['ecency']),
|
||||
jsonMetadata,
|
||||
null,
|
||||
null,
|
||||
)
|
||||
|
@ -49,6 +49,7 @@ import bugsnapInstance from '../../../config/bugsnag';
|
||||
import { useUserActivityMutation } from '../../../providers/queries/pointQueries';
|
||||
import { PointActivityIds } from '../../../providers/ecency/ecency.types';
|
||||
import { usePostsCachePrimer } from '../../../providers/queries/postQueries/postQueries';
|
||||
import { PostTypes } from '../../../constants/postTypes';
|
||||
|
||||
/*
|
||||
* Props Name Description Value
|
||||
@ -716,6 +717,13 @@ class EditorContainer extends Component<EditorContainerProps, any> {
|
||||
const parentTags = post.json_metadata.tags;
|
||||
const draftId = `${currentAccount.name}/${parentAuthor}/${parentPermlink}`; // different draftId for each user acount
|
||||
|
||||
const meta = await extractMetadata({
|
||||
body: fields.body,
|
||||
fetchRatios: true,
|
||||
postType: PostTypes.COMMENT
|
||||
})
|
||||
const jsonMetadata = makeJsonMetadata(meta, parentTags || ['ecency'])
|
||||
|
||||
await postComment(
|
||||
currentAccount,
|
||||
pinCode,
|
||||
@ -723,7 +731,7 @@ class EditorContainer extends Component<EditorContainerProps, any> {
|
||||
parentPermlink,
|
||||
permlink,
|
||||
fields.body,
|
||||
parentTags,
|
||||
jsonMetadata
|
||||
)
|
||||
.then((response) => {
|
||||
// record user activity for points
|
||||
@ -1135,7 +1143,7 @@ class EditorContainer extends Component<EditorContainerProps, any> {
|
||||
handleShouldReblogChange={this._handleShouldReblogChange}
|
||||
handleSchedulePress={this._handleSchedulePress}
|
||||
handleFormChanged={this._handleFormChanged}
|
||||
handleOnBackPress={() => {}}
|
||||
handleOnBackPress={() => { }}
|
||||
handleOnSubmit={this._handleSubmit}
|
||||
initialEditor={this._initialEditor}
|
||||
isDarkTheme={isDarkTheme}
|
||||
|
Loading…
Reference in New Issue
Block a user