mirror of
				https://github.com/iv-org/invidious.git
				synced 2025-10-31 12:42:09 +00:00 
			
		
		
		
	Merge pull request #3039 from iv-org/SamantazFox-patch-1
Fix comment "pings" (#3038)
This commit is contained in:
		| @@ -602,7 +602,13 @@ def content_to_comment_html(content) | ||||
|           text = %(<a href="/watch?v=#{video_id}">#{"youtube.com/watch?v=#{video_id}"}</a>) | ||||
|         end | ||||
|       elsif url = run.dig?("navigationEndpoint", "commandMetadata", "webCommandMetadata", "url").try &.as_s | ||||
|         text = %(<a href="#{url}">#{reduce_uri(url)}</a>) | ||||
|         if text.starts_with?(/\s?@/) | ||||
|           # Handle "pings" in comments differently | ||||
|           # See: https://github.com/iv-org/invidious/issues/3038 | ||||
|           text = %(<a href="#{url}">#{text}</a>) | ||||
|         else | ||||
|           text = %(<a href="#{url}">#{reduce_uri(url)}</a>) | ||||
|         end | ||||
|       end | ||||
|     end | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Samantaz Fox
					Samantaz Fox