messages: Use overloads to only return a user_message if needed.

This commit is contained in:
Alex Vandiver
2024-03-22 05:45:17 +00:00
committed by Tim Abbott
parent 6ace34c374
commit f92d43c690
9 changed files with 59 additions and 15 deletions

View File

@@ -1217,7 +1217,7 @@ def check_update_message(
and raises a JsonableError if otherwise.
It returns the number changed.
"""
message, ignored_user_message = access_message(user_profile, message_id, lock_message=True)
message = access_message(user_profile, message_id, lock_message=True)
# If there is a change to the content, check that it hasn't been too long
# Allow an extra 20 seconds since we potentially allow editing 15 seconds