mirror of
				https://gitlab.com/animath/si/plateforme.git
				synced 2025-11-04 12:32:18 +01:00 
			
		
		
		
	Fix matrix avatar
This commit is contained in:
		@@ -23,7 +23,10 @@ class Command(BaseCommand):
 | 
			
		||||
        else:  # pragma: no cover
 | 
			
		||||
            if not os.path.isfile(".matrix_avatar"):
 | 
			
		||||
                avatar_uri = Matrix.get_avatar()
 | 
			
		||||
                if not isinstance(avatar_uri, str):
 | 
			
		||||
                if isinstance(avatar_uri, str):
 | 
			
		||||
                    with open(".matrix_avatar", "w") as f:
 | 
			
		||||
                        f.write(avatar_uri)
 | 
			
		||||
                else:
 | 
			
		||||
                    stat_file = os.stat("tfjm/static/logo.png")
 | 
			
		||||
                    with open("tfjm/static/logo.png", "rb") as f:
 | 
			
		||||
                        resp = Matrix.upload(f, filename="logo.png", content_type="image/png",
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user