Make thread/channel/message deletion complete (hard delete)
Deleting a thread, channel, or message was a no-op/soft-delete: messages were only dropped from the plugin outbox (still in hermes' session store, hence searchable/recoverable) and channels/threads were merely archived. Now deletion is complete and non-recoverable, with no search trace: - purge.py (new): hard-delete from hermes' session store (state.db). delete_lane wipes a channel's/thread's sessions + messages; deleting a messages row also drops it from the FTS5 index via the delete triggers. delete_message removes one message, matched by (session, role, exact content, closest timestamp) since plugin m_<hex> ids aren't persisted. - channels.py: delete() hard-deletes the row (and a channel's child threads) instead of archiving. - outbox.py: add delete_lane() (wipe all frames for a lane) and message_info() (read a message's final role/text/ts for the match). - adapter.py: on_channel_delete wipes outbox + session store; on_message_delete purges the session-store row per message. - App: delete confirmations no longer claim history stays for search; ChannelStore removes a channel's threads on channel delete. - Docs updated to describe hard deletion.
This commit is contained in:
1 parent
9286937e2d
commit
17bf41a0b9
11 files changed
+373
-51
No files matched your search
@@ -556,7 +556,7 @@ def channel_renamed(entry: dict[str, Any]) -> Frame:
|
||||
|
||||
|
||||
def channel_deleted(chat_id: str) -> Frame:
|
||||
"""Broadcast: a channel was archived (soft-deleted)."""
|
||||
"""Broadcast: a channel or thread was deleted (its history wiped too)."""
|
||||
return Frame(type=TYPE_CHANNEL_DELETED, payload={"chat_id": chat_id})
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user