summary refs log tree commit diff
diff options
context:
space:
mode:
authorVaishnav Nair <64798176+totallynotvaishnav@users.noreply.github.com>2022-01-26 20:18:27 +0530
committerGitHub <noreply@github.com>2022-01-26 14:48:27 +0000
commitcef0d5d90a4782096c03ec79f825d114b8d61b6e (patch)
treed3aa800abab14dddd8e5e9dc7b7c832c353c674a
parentAdd a module callback to set username at registration (#11790) (diff)
downloadsynapse-cef0d5d90a4782096c03ec79f825d114b8d61b6e.tar.xz
Include `prev_content` field in AS events (#11798)
* Include 'prev_content' field in AS events

Signed-off-by: Vaishnav Nair <nairvaishnav007@icloud.com>
Co-authored-by: Brendan Abolivier <babolivier@matrix.org>
-rw-r--r--changelog.d/11798.bugfix1
-rw-r--r--synapse/storage/databases/main/appservice.py2
2 files changed, 2 insertions, 1 deletions
diff --git a/changelog.d/11798.bugfix b/changelog.d/11798.bugfix
new file mode 100644
index 0000000000..2651fd11cf
--- /dev/null
+++ b/changelog.d/11798.bugfix
@@ -0,0 +1 @@
+Include a `prev_content` field in state events sent to Application Services. Contributed by @totallynotvaishnav.
\ No newline at end of file
diff --git a/synapse/storage/databases/main/appservice.py b/synapse/storage/databases/main/appservice.py
index 92c95a41d7..2bb5288431 100644
--- a/synapse/storage/databases/main/appservice.py
+++ b/synapse/storage/databases/main/appservice.py
@@ -384,7 +384,7 @@ class ApplicationServiceTransactionWorkerStore(
             "get_new_events_for_appservice", get_new_events_for_appservice_txn
         )
 
-        events = await self.get_events_as_list(event_ids)
+        events = await self.get_events_as_list(event_ids, get_prev_content=True)
 
         return upper_bound, events