mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 11:26:09 -04:00
Open up /events to anonymous users for room events only
Squash-merge of PR #345 from daniel/anonymousevents
This commit is contained in:
parent
7a369e8a55
commit
ca2f90742d
20 changed files with 299 additions and 82 deletions
|
@ -202,6 +202,19 @@ class RoomStore(SQLBaseStore):
|
|||
txn, event, "content.body", event.content["body"]
|
||||
)
|
||||
|
||||
def _store_history_visibility_txn(self, txn, event):
|
||||
if hasattr(event, "content") and "history_visibility" in event.content:
|
||||
sql = (
|
||||
"INSERT INTO history_visibility"
|
||||
" (event_id, room_id, history_visibility)"
|
||||
" VALUES (?, ?, ?)"
|
||||
)
|
||||
txn.execute(sql, (
|
||||
event.event_id,
|
||||
event.room_id,
|
||||
event.content["history_visibility"]
|
||||
))
|
||||
|
||||
def _store_event_search_txn(self, txn, event, key, value):
|
||||
if isinstance(self.database_engine, PostgresEngine):
|
||||
sql = (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue