mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	push_notifications: Handle empty rendered_messages.
This parallels fe25517295, but for mobile notifications.  It also
adds a test, which verifies that such content does not crash either
mobile or email notifications.
			
			
This commit is contained in:
		
				
					committed by
					
						
						Alex Vandiver
					
				
			
			
				
	
			
			
			
						parent
						
							039b869ca5
						
					
				
				
					commit
					8c72959951
				
			@@ -636,7 +636,7 @@ def get_mobile_push_content(rendered_content: str) -> str:
 | 
			
		||||
            + "*"
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
    elem = lxml.html.fromstring(rendered_content)
 | 
			
		||||
    elem = lxml.html.fragment_fromstring(rendered_content, create_parent=True)
 | 
			
		||||
    plain_text = process(elem)
 | 
			
		||||
    return plain_text
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user