mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	lightbox: Add debugging code for unknown message IDs.
This should help debug a traceback we've been seeing in production where the fetched message was undefined.
This commit is contained in:
		@@ -116,9 +116,12 @@ exports.open = function (image, options) {
 | 
				
			|||||||
            $type = "image";
 | 
					            $type = "image";
 | 
				
			||||||
            $source = $image.attr("src");
 | 
					            $source = $image.attr("src");
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					        var message = message_store.get($message.attr("zid"));
 | 
				
			||||||
 | 
					        if (message === undefined) {
 | 
				
			||||||
 | 
					            blueslip.error("Lightbox for unknown message " + $message.attr("zid"));
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
        payload = {
 | 
					        payload = {
 | 
				
			||||||
            user: message_store.get($message.attr("zid")).sender_full_name,
 | 
					            user: message.sender_full_name,
 | 
				
			||||||
            title: $image.parent().attr("title"),
 | 
					            title: $image.parent().attr("title"),
 | 
				
			||||||
            type: $type,
 | 
					            type: $type,
 | 
				
			||||||
            preview: $image.attr("src"),
 | 
					            preview: $image.attr("src"),
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user