mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	reactions.py: Don't check for valid emoji name while removing reaction.
On receiving a request for deleting a reaction, just check if such a reaction exists or not. If it exists then just delete the reaction otherwise send an error message that such a reaction doesn't exist. It doesn't make sense to check whether an emoji name is valid or not.
This commit is contained in:
		@@ -51,8 +51,6 @@ def remove_reaction_backend(request, user_profile, message_id, emoji_name):
 | 
			
		||||
    # cannot see the message (e.g. for messages to private streams).
 | 
			
		||||
    message = access_message(user_profile, message_id)[0]
 | 
			
		||||
 | 
			
		||||
    check_valid_emoji(message.sender.realm, emoji_name)
 | 
			
		||||
 | 
			
		||||
    # We could probably just make this check be a try/except for the
 | 
			
		||||
    # IntegrityError from it already existing, but this is a bit cleaner.
 | 
			
		||||
    if not Reaction.objects.filter(user_profile=user_profile,
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user