mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	Extract get_turtle_message().
This seems like kind of a silly function to extract to topic.py, but it will theoretically help us sweep "subject" if we change the DB. It had test coverage.
This commit is contained in:
		@@ -227,3 +227,12 @@ def get_topic_history_for_web_public_stream(recipient: Recipient) -> List[Dict[s
 | 
			
		||||
    cursor.close()
 | 
			
		||||
 | 
			
		||||
    return generate_topic_history_from_db_rows(rows)
 | 
			
		||||
 | 
			
		||||
def get_turtle_message(message_ids: List[int]) -> Message:
 | 
			
		||||
    # This is used for onboarding, and it's only extracted
 | 
			
		||||
    # here to make subject -> topic sweeping easier.
 | 
			
		||||
    turtle_message = Message.objects.get(  # nolint
 | 
			
		||||
        id__in=message_ids,
 | 
			
		||||
        subject='topic demonstration',
 | 
			
		||||
        content__icontains='cute/turtle.png')
 | 
			
		||||
    return turtle_message
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user