From 3dcc32bbdcd21e10c4ec8c0be66400a3ffacbddd Mon Sep 17 00:00:00 2001 From: Ashish Dhama <16203333+AshishDhama@users.noreply.github.com> Date: Mon, 8 May 2023 19:47:45 +0530 Subject: [PATCH] fix import issue in forward post actions (#23329) --- webapp/channels/src/actions/views/posts.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/webapp/channels/src/actions/views/posts.js b/webapp/channels/src/actions/views/posts.js index 66b1022c8c..209e509dec 100644 --- a/webapp/channels/src/actions/views/posts.js +++ b/webapp/channels/src/actions/views/posts.js @@ -12,7 +12,8 @@ import {isCustomGroupsEnabled} from 'mattermost-redux/selectors/entities/prefere import {getAssociatedGroupsForReferenceByMention} from 'mattermost-redux/selectors/entities/groups'; import {getCurrentTeam} from 'mattermost-redux/selectors/entities/teams'; -import * as Utils from 'utils/utils'; +import {getTimestamp} from 'utils/utils'; +import {getPermalinkURL} from 'selectors/urls'; import {getSiteURL} from 'utils/url'; import {containsAtChannel, groupsMentionedInText} from 'utils/post_utils'; import {ActionTypes, AnnouncementBarTypes} from 'utils/constants'; @@ -40,7 +41,7 @@ export function forwardPost(post, channel, message = '') { const currentUserId = getCurrentUserId(state); const currentTeam = getCurrentTeam(state); - const relativePermaLink = Utils.getPermalinkURL(state, currentTeam.id, post.id); + const relativePermaLink = getPermalinkURL(state, currentTeam.id, post.id); const permaLink = `${getSiteURL()}${relativePermaLink}`; const license = getLicense(state); @@ -54,7 +55,7 @@ export function forwardPost(post, channel, message = '') { newPost.channel_id = channelId; - const time = Utils.getTimestamp(); + const time = getTimestamp(); const userId = currentUserId; newPost.message = message ? `${message}\n${permaLink}` : permaLink;