Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
synapse
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Timo Ley
synapse
Commits
f29b41fd
Unverified
Commit
f29b41fd
authored
6 years ago
by
Richard van der Hoff
Committed by
GitHub
6 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #3324 from matrix-org/rav/remove_dead_method
Remove was_forgotten_at
parents
28b0490d
c1f4118b
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
synapse/storage/roommember.py
+0
-26
0 additions, 26 deletions
synapse/storage/roommember.py
with
0 additions
and
26 deletions
synapse/storage/roommember.py
+
0
−
26
View file @
f29b41fd
...
@@ -578,7 +578,6 @@ class RoomMemberStore(RoomMemberWorkerStore):
...
@@ -578,7 +578,6 @@ class RoomMemberStore(RoomMemberWorkerStore):
)
)
txn
.
execute
(
sql
,
(
user_id
,
room_id
))
txn
.
execute
(
sql
,
(
user_id
,
room_id
))
txn
.
call_after
(
self
.
was_forgotten_at
.
invalidate_all
)
txn
.
call_after
(
self
.
did_forget
.
invalidate
,
(
user_id
,
room_id
))
txn
.
call_after
(
self
.
did_forget
.
invalidate
,
(
user_id
,
room_id
))
self
.
_invalidate_cache_and_stream
(
self
.
_invalidate_cache_and_stream
(
txn
,
self
.
who_forgot_in_room
,
(
room_id
,)
txn
,
self
.
who_forgot_in_room
,
(
room_id
,)
...
@@ -609,31 +608,6 @@ class RoomMemberStore(RoomMemberWorkerStore):
...
@@ -609,31 +608,6 @@ class RoomMemberStore(RoomMemberWorkerStore):
count
=
yield
self
.
runInteraction
(
"
did_forget_membership
"
,
f
)
count
=
yield
self
.
runInteraction
(
"
did_forget_membership
"
,
f
)
defer
.
returnValue
(
count
==
0
)
defer
.
returnValue
(
count
==
0
)
@cachedInlineCallbacks
(
num_args
=
3
)
def
was_forgotten_at
(
self
,
user_id
,
room_id
,
event_id
):
"""
Returns whether user_id has elected to discard history for room_id at
event_id.
event_id must be a membership event.
"""
def
f
(
txn
):
sql
=
(
"
SELECT
"
"
forgotten
"
"
FROM
"
"
room_memberships
"
"
WHERE
"
"
user_id = ?
"
"
AND
"
"
room_id = ?
"
"
AND
"
"
event_id = ?
"
)
txn
.
execute
(
sql
,
(
user_id
,
room_id
,
event_id
))
rows
=
txn
.
fetchall
()
return
rows
[
0
][
0
]
forgot
=
yield
self
.
runInteraction
(
"
did_forget_membership_at
"
,
f
)
defer
.
returnValue
(
forgot
==
1
)
@defer.inlineCallbacks
@defer.inlineCallbacks
def
_background_add_membership_profile
(
self
,
progress
,
batch_size
):
def
_background_add_membership_profile
(
self
,
progress
,
batch_size
):
target_min_stream_id
=
progress
.
get
(
target_min_stream_id
=
progress
.
get
(
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment