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>
Этот коммит содержится в:
коммит произвёл
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)}`,
|
||||
|
||||
Ссылка в новой задаче
Block a user