From 40b5f710547aff1b0c1bc7a974d2895f98c29706 Mon Sep 17 00:00:00 2001 From: Georg Bremer Date: Tue, 11 Mar 2025 23:48:51 +0100 Subject: [PATCH] feat: Add Client4.createPostEphemeral method (#30117) * feat: Add Client4.createPostEphemeral method * Update webapp/platform/client/src/client4.ts --------- Co-authored-by: Harrison Healey Co-authored-by: Mattermost Build --- webapp/platform/client/src/client4.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/webapp/platform/client/src/client4.ts b/webapp/platform/client/src/client4.ts index 6cd0458118..65357d336b 100644 --- a/webapp/platform/client/src/client4.ts +++ b/webapp/platform/client/src/client4.ts @@ -2130,6 +2130,14 @@ export default class Client4 { return result; }; + createPostEphemeral = async (userID: string, post: PartialExcept) => { + const result = await this.doFetch( + `${this.getPostsRoute()}/ephemeral`, + {method: 'post', body: JSON.stringify({user_id: userID, post})}, + ); + return result; + }; + updatePost = (post: Post) => { return this.doFetch( `${this.getPostRoute(post.id)}`,