mirror of
https://github.com/zulip/zulip.git
synced 2025-11-15 11:22:04 +00:00
Remove "/stats" command for now.
The "/stats" command doesn't actually do anything interesting yet, and it also writes to the message feed instead of replying directly to the user. The history of this command was that it was written during a PyCon sprint. It was mainly intended as an example for subsequent slash commands. The ones we built after "/stats" have sort of outgrown "/stats" and don't follow the original structure for "/stats". (The "/day", "/ping", and "/settings" commands were built shortly after.)j We probably want to ressurect "/stats" fairly soon, after figuring out some useful stats and refining the UI. As you can see from this commit, resurrecting the code here shouldn't be too difficult, but it may actually be pretty rare that we just translate slash commands into fleshed out messages.
This commit is contained in:
@@ -93,8 +93,7 @@ from zerver.lib.alert_words import alert_words_in_realm
|
||||
from zerver.lib.avatar import avatar_url, avatar_url_from_dict
|
||||
from zerver.lib.stream_recipient import StreamRecipientMap
|
||||
from zerver.lib.validator import check_widget_content
|
||||
from zerver.lib.widget import do_widget_post_save_actions, \
|
||||
do_widget_pre_save_actions
|
||||
from zerver.lib.widget import do_widget_post_save_actions
|
||||
|
||||
from django.db import transaction, IntegrityError, connection
|
||||
from django.db.models import F, Q, Max, Sum
|
||||
@@ -1215,9 +1214,6 @@ def do_send_messages(messages_maybe_none: Sequence[Optional[MutableMapping[str,
|
||||
message['sender_queue_id'] = message.get('sender_queue_id', None)
|
||||
message['realm'] = message.get('realm', message['message'].sender.realm)
|
||||
|
||||
# Some widgets need to overwrite content/etc. before message is saved.
|
||||
do_widget_pre_save_actions(message)
|
||||
|
||||
mention_data = bugdown.MentionData(
|
||||
realm_id=message['realm'].id,
|
||||
content=message['message'].content,
|
||||
|
||||
Reference in New Issue
Block a user