feat: Add Client4.createPostEphemeral method (#30117)

* feat: Add Client4.createPostEphemeral method

* Update webapp/platform/client/src/client4.ts

---------

Co-authored-by: Harrison Healey <harrisonmhealey@gmail.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
Georg Bremer
2025-03-11 23:48:51 +01:00
коммит произвёл GitHub
родитель a4c5e52b6b
Коммит 40b5f71054

Просмотреть файл

@@ -2130,6 +2130,14 @@ export default class Client4 {
return result;
};
createPostEphemeral = async (userID: string, post: PartialExcept<Post, 'channel_id' | 'message'>) => {
const result = await this.doFetch<Post>(
`${this.getPostsRoute()}/ephemeral`,
{method: 'post', body: JSON.stringify({user_id: userID, post})},
);
return result;
};
updatePost = (post: Post) => {
return this.doFetch<Post>(
`${this.getPostRoute(post.id)}`,