Content Control: Users can only edit and delete their own messages, ensuring content ownership while maintaining conversation integrity. All modifications include audit trails with timestamps for transparency.
Message Management Overview
Edit and delete functionality provides users with control over their sent messages, allowing corrections, content updates, and removal when necessary. All operations maintain audit trails and respect permission boundaries.Message Editing
Content modification
- Text message updates
- Custom message editing
- Timestamp tracking
Message Deletion
Content removal
- Soft delete functionality
- Conversation continuity
- Permission enforcement
- Visibility control
Implementation Guide
Modify existing message content with proper trackingEdit your own messages with automatic timestamp updates and audit timestamp for transparency.
Edit Permissions
Permission | Description |
---|---|
Own Messages Only | Users can only edit messages they created |
Time Window | Optional time limits for editing (configurable) |
Content Types | Text and custom messages support editing |
Audit Trail | editedAt automatically updated on modifications |
Required Parameters
Parameter | Type | Description |
---|---|---|
messageId | String | Unique identifier of the message to edit |
content | String/Object | New content for the message (text or custom data) |
Optional Parameters
Parameter | Type | Description |
---|---|---|
tags | Array<String> | Updated message tags |
metadata | Object | Additional properties and information |
Code Examples
Edit Tracking
Property | Type | Description |
---|---|---|
editedAt | DateTime | Timestamp of last edit |
Edit Indicator: When a message is edited, the
editedAt
is automatically set to the current time, allowing your UI to display edit indicators to inform users when content has been modified.Permission Management
Edit Permissions
Edit Permissions
Managing who can edit messages and whenOwnership-Based Permissions
- Creator-Only Editing: Users can only edit messages they created
- Role-Based Exceptions: Moderators and admins may have broader edit permissions
- Channel-Level Controls: Channel moderators may also update individual message information
- Group Permissions: Special permissions for group administrators
- Edit Windows: Configurable time limits after message creation
- Grace Periods: Short windows for immediate corrections
- Extended Permissions: Longer edit windows for premium users or specific roles
- No Time Limits: Unrestricted editing for certain user types
- Message Type Limits: Some message types may not be editable
- Reply Restrictions: Different rules for replies vs. top-level messages
- Thread Considerations: Editing parent messages affects entire threads
- Custom Message Rules: Special handling for custom message types
Delete Permissions
Delete Permissions
Controlling message deletion access and behaviorDelete Permission Levels
- Self-Delete: Users can delete their own messages
- Moderator Delete: Moderators can delete any message in their channels
- Admin Delete: Administrators have global delete permissions
- System Delete: Automated deletion based on policies
- Soft Delete: Message marked as deleted but preserved in database
- Hard Delete: Permanent removal from all systems
- Thread Preservation: Maintain thread structure when parent messages deleted
- Reply Handling: Options for orphaned replies when parent deleted
- Deletion Logs: Track all deletion events with timestamps
- Recovery Options: Ability to potentially restore soft-deleted messages
- Compliance Features: GDPR and data protection compliance
Related Features
Message Creation
Create messages
Send text, media, and custom messages
View Messages
Display content
Retrieve and view message content
Message Queries
Find messages
Search and filter message content
Implementation Strategy: Start with basic edit and delete functionality, then progressively add advanced features like edit history, undo options, and comprehensive validation. Always prioritize user experience and provide clear feedback for all operations.