mirror of
				https://github.com/TeamPiped/Piped-Backend.git
				synced 2024-08-14 23:51:41 +00:00 
			
		
		
		
	Allow Avatar URL to change in channel.
This commit is contained in:
		
							parent
							
								
									d18a019640
								
							
						
					
					
						commit
						86154a1a29
					
				
					 2 changed files with 4 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -24,7 +24,7 @@ public class CustomServletDecorator implements AsyncServlet {
 | 
			
		|||
    }
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    public @NotNull Promisable<HttpResponse> serve(@NotNull HttpRequest request) {
 | 
			
		||||
    public @NotNull Promisable<HttpResponse> serve(@NotNull HttpRequest request) throws Exception {
 | 
			
		||||
        long before = System.nanoTime();
 | 
			
		||||
        return servlet.serve(request).promise().map(response -> {
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -218,8 +218,10 @@ public class ResponseHelper {
 | 
			
		|||
            me.kavin.piped.utils.obj.db.Channel channel = DatabaseHelper.getChannelFromId(s, info.getId());
 | 
			
		||||
 | 
			
		||||
            if (channel != null) {
 | 
			
		||||
                if (channel.isVerified() != info.isVerified()) {
 | 
			
		||||
                if (channel.isVerified() != info.isVerified()
 | 
			
		||||
                        || !channel.getUploaderAvatar().equals(info.getAvatarUrl())) {
 | 
			
		||||
                    channel.setVerified(info.isVerified());
 | 
			
		||||
                    channel.setUploaderAvatar(info.getAvatarUrl());
 | 
			
		||||
                    if (!s.getTransaction().isActive())
 | 
			
		||||
                        s.getTransaction().begin();
 | 
			
		||||
                    s.update(channel);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue