mattermost/mattermost

Support UpdateEphemeralPost and DeleteEphemeralPost through REST API

开放

#21,510 创建于 2022年10月25日

 (2 条评论) (0 个反应) (1 位负责人)TypeScript (7,823 个派生)batch import
HacktoberfestHelp Wanted

仓库指标

星标
 (32,880 个星标)
PR 合并指标
 (平均合并 6天 5小时) (30 天内合并 318 个 PR)

描述

Currently the plugin API supports [UpdateEphemeralPost](https://developers.mattermost.com/integrate/plugins/components/server/reference/#API.UpdateEphemeralPost] and [DeleteEphemeralPost|https://developers.mattermost.com/integrate/plugins/components/server/reference/#API.DeleteEphemeralPost), but these functions are not available through the REST API.

When an integration creates an ephemeral post, it will be provided the id of the ephemeral post, and no other party knows of this id other than the client itself. Therefore, if an ephemeral post id is provided through the REST API, we know that the originator of this request must be the creator of the ephemeral post. Since this post doesn’t have an actual author, there is no way to check for access control when performing operations on the existing ephemeral post, so we can only “blindly” allow this operation, as long as the request is coming from an authenticated user (such as a bot user).

The task here is to add two API methods to update and delete ephemeral posts, and perform the operations similar to how to the plugin API performs these operations.

Original discussion in this thread https://community.mattermost.com/core/pl/quu1drn9dff6uc7ty3p9q4t6mh


If you're interested please comment here and come join our "Contributors" community channel on our daily build server, where you can discuss questions with community members and the Mattermost core team. For technical advice or questions, please join our "Developers" community channel.

New contributors please see our Developer's Guide.

JIRA: https://mattermost.atlassian.net/browse/MM-47939

贡献者指南