Skip to content

connector: add admin command to clean unused Telegram ghosts#1070

Open
nikolya-prodigy wants to merge 1 commit into
mautrix:mainfrom
nikolya-prodigy:pr/cleanup-unused-telegram-ghosts
Open

connector: add admin command to clean unused Telegram ghosts#1070
nikolya-prodigy wants to merge 1 commit into
mautrix:mainfrom
nikolya-prodigy:pr/cleanup-unused-telegram-ghosts

Conversation

@nikolya-prodigy
Copy link
Copy Markdown

Summary

Adds an admin-only cleanup-users command for finding and deleting unused Telegram ghost records from the bridge database.

A ghost is considered unused when it has:

  • no Telegram login
  • no DM portal
  • no bridged messages
  • no reactions

The command intentionally does not purge Synapse users or media. It only removes bridge-side records.

Why

Large Telegram accounts can accumulate ghost records from contacts or background updates. This gives bridge admins a conservative cleanup tool without touching homeserver history.

Testing

  • go test ./pkg/connector/...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant