mirror of
https://github.com/zulip/zulip.git
synced 2025-11-11 09:27:43 +00:00
This is a very old commit for #106, which has been on hiatus for a few years. It was significantly modified by tabbott to: * Improve coding style and variable names * Update mypy annotations style * Clean up the testing logic * Update for API changes elsewhere in our system But the actual runtime code is essentially unmodified from the original work by Kirill. It contains basic support for archiving Messages, UserMessages, and Attachments with a nice test suite. It's still not usable in production (e.g. it will probably break Reactions, SubMessages, etc.), but upcoming commits will address that.
13 lines
282 B
Python
13 lines
282 B
Python
from __future__ import absolute_import
|
|
|
|
from typing import Any
|
|
|
|
from django.core.management.base import BaseCommand
|
|
from zerver.lib.retention import archive_messages
|
|
|
|
|
|
class Command(BaseCommand):
|
|
|
|
def handle(self, *args: Any, **options: str) -> None:
|
|
archive_messages()
|