I added edit and delete options to the message #623
Juergen-Coding
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
|
Hi! Any chance you open up a PR for this work? Sounds great! That will make it easier for me to review, test, and get into master. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello folks,
I added something: Message View: Edit + Soft-Delete
Added Edit and Delete options to the message view footer menu (HM1) in config/menus/the_news_bbs-message_base.hjson.
See (#596)
Added key bindings:
E → edit current message
X → soft-delete current message (prompt/confirm)
Delete behavior is soft-delete: marks a message as deleted (currently via subject == "[DELETED]").
Edit Existing Messages (Forum-style editing)
implemented an edit workflow that loads an existing message from SQLite and opens the post editor with prefilled fields (From/To/Subject/Body).
Edit mode passes the current message UUID via
extraArgs.editMessageUuidfrom the message view module to the post editor.Files touched:
core/msg_area_view_fse.jscore/msg_area_post_fse.jsDatabase Update Semantics (avoid REPLACE)
Added updateInPlace() to core/message.js to update an existing message without using REPLACE INTO, keeping the original message_id stable (important for reply chains / references).
UPDATE message SET subject=?, message=?, modified_timestamp=? WHERE message_uuid=?Hide deleted messages from message list
Deleted messages are excluded from the message list/index so _[DELETED] i_tems do not appear in the overview.
Implemented via filtering on subject != "[DELETED]" (integration performed in the modified code paths above).
Configuration / Debugging
Updated config/config.hjson during debugging (e.g. logging level set to trace).
Notes / Behavior
Current soft-delete uses subject == "[DELETED]" as the marker.
Suggested improvement: soft-delete should change only the subject, leaving the body intact for a future “undelete” feature.
Installation / Apply Patch (no DB migrations required)
Prerequisites: Make a full backup of your ENiGMA directory and database files before applying any changes!!!
Files to copy/merge: Copy (or merge) these files into your ENiGMA installation:
If the target system uses a different theme/menu set, you may need to integrate the menu changes into the correct *-message_base.hjson for that setup.
Database
No schema changes required. No new tables, indexes, or migrations are needed. The patch only performs standard UPDATE operations on the existing message table.
Restart: Restart ENiGMA after copying the files:
How to test
Open a message in a public area.
Press E to edit:
Editor opens with existing subject/body prefilled.
Typing immediately after opening should not cause cursor/focus jumps.
Save updates the existing message in place (same message_id, same UUID).
Press X to delete:
Message is marked as deleted (subject becomes [DELETED]).
Deleted message no longer appears in the area message list.
The text of the post remains unchanged.
Rollback, If anything goes wrong:
IMPORTANT: Make a backup first (!!)
DISCLAIMER: I assume no responsibility for any data loss.
Future:
EnigmaBBS_ED_2026_01_16_01.zip
Beta Was this translation helpful? Give feedback.
All reactions