-
-
Notifications
You must be signed in to change notification settings - Fork 651
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
action sheet: Add delete topic feature.
The webapp offers the feature to delete all messages within a topic for a stream. This feature is missing in the mobile app. Create action `deleteMessagesForTopic()`. Create API function 'deleteTopic'. Add 'Delete topic' action in message action sheet.
- Loading branch information
Showing
5 changed files
with
76 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/* @flow strict-local */ | ||
import type { ApiResponse, Auth } from '../transportTypes'; | ||
import { apiPost } from '../apiFetch'; | ||
|
||
/** | ||
* Delete all messages in a stream for a given topic. | ||
*/ | ||
export default async (auth: Auth, streamId: number, topicName: string): Promise<ApiResponse> => | ||
apiPost(auth, `streams/${streamId}/delete_topic`, { | ||
topic_name: topicName, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters