api: Remove legacy emoji reactions endpoint.

The original/legacy emoji reactions endpoints made use of HTTP PUT and
didn't have an API that could correctly handle situations where the
emoji names change over time.  We stopped using the legacy endpoints
some time ago, so we can remove them now.

This requires straightforward updates to older tests that were still
written against the legacy API.

Fixes #12940.
This commit is contained in:
Gloria Elston
2019-10-10 12:03:09 -05:00
committed by Tim Abbott
parent ddd1a0eb00
commit f8855ca179
7 changed files with 131 additions and 92 deletions

View File

@@ -213,19 +213,14 @@ v1_api_and_json_patterns = [
{'POST': 'zerver.views.submessage.process_submessage'}),
# New endpoint for handling reactions.
# reactions -> zerver.view.reactions
# POST adds a reaction to a message
# DELETE removes a reaction from a message
url(r'^messages/(?P<message_id>[0-9]+)/reactions$',
rest_dispatch,
{'POST': 'zerver.views.reactions.add_reaction',
'DELETE': 'zerver.views.reactions.remove_reaction'}),
# reactions -> zerver.view.reactions
# PUT adds a reaction to a message
# DELETE removes a reaction from a message
url(r'^messages/(?P<message_id>[0-9]+)/emoji_reactions/(?P<emoji_name>.*)$',
rest_dispatch,
{'PUT': 'zerver.views.reactions.add_reaction_legacy',
'DELETE': 'zerver.views.reactions.remove_reaction_legacy'}),
# attachments -> zerver.views.attachments
url(r'^attachments$', rest_dispatch,
{'GET': 'zerver.views.attachments.list_by_user'}),