summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
Diffstat (limited to 'synapse')
-rw-r--r--synapse/rest/media/v1/media_repository.py4
-rw-r--r--synapse/server.pyi8
2 files changed, 10 insertions, 2 deletions
diff --git a/synapse/rest/media/v1/media_repository.py b/synapse/rest/media/v1/media_repository.py
index 515b3d3e74..057c925b7b 100644
--- a/synapse/rest/media/v1/media_repository.py
+++ b/synapse/rest/media/v1/media_repository.py
@@ -490,12 +490,12 @@ class MediaRepository(object):
             if t_type == "crop":
                 t_byte_source = yield make_deferred_yieldable(threads.deferToThread(
                     thumbnailer.crop,
-                    r_width, r_height, t_type,
+                    t_width, t_height, t_type,
                 ))
             else:
                 t_byte_source = yield make_deferred_yieldable(threads.deferToThread(
                     thumbnailer.scale,
-                    r_width, r_height, t_type,
+                    t_width, t_height, t_type,
                 ))
 
             if not t_byte_source:
diff --git a/synapse/server.pyi b/synapse/server.pyi
index 9570df5537..e8c0386b7f 100644
--- a/synapse/server.pyi
+++ b/synapse/server.pyi
@@ -1,4 +1,6 @@
 import synapse.api.auth
+import synapse.federation.transaction_queue
+import synapse.federation.transport.client
 import synapse.handlers
 import synapse.handlers.auth
 import synapse.handlers.device
@@ -27,3 +29,9 @@ class HomeServer(object):
 
     def get_state_handler(self) -> synapse.state.StateHandler:
         pass
+
+    def get_federation_sender(self) -> synapse.federation.transaction_queue.TransactionQueue:
+        pass
+
+    def get_federation_transport_client(self) -> synapse.federation.transport.client.TransportLayerClient:
+        pass