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:
Steve Howell
2018-08-08 23:22:53 +00:00
committed by Tim Abbott
parent 298aa0fcbf
commit 2e42bdd7c3
2 changed files with 1 additions and 15 deletions

View File

@@ -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,