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
f4884444
Unverified
Commit
f4884444
authored
5 years ago
by
Richard van der Hoff
Committed by
GitHub
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
remove unused room_version_to_event_format (#6857)
parent
e1b24032
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
changelog.d/6857.misc
+1
-0
1 addition, 0 deletions
changelog.d/6857.misc
synapse/events/__init__.py
+1
-23
1 addition, 23 deletions
synapse/events/__init__.py
with
2 additions
and
23 deletions
changelog.d/6857.misc
0 → 100644
+
1
−
0
View file @
f4884444
Refactoring work in preparation for changing the event redaction algorithm.
This diff is collapsed.
Click to expand it.
synapse/events/__init__.py
+
1
−
23
View file @
f4884444
...
...
@@ -21,8 +21,7 @@ import six
from
unpaddedbase64
import
encode_base64
from
synapse.api.errors
import
UnsupportedRoomVersionError
from
synapse.api.room_versions
import
KNOWN_ROOM_VERSIONS
,
EventFormatVersions
from
synapse.api.room_versions
import
EventFormatVersions
from
synapse.types
import
JsonDict
from
synapse.util.caches
import
intern_dict
from
synapse.util.frozenutils
import
freeze
...
...
@@ -408,27 +407,6 @@ class FrozenEventV3(FrozenEventV2):
return
self
.
_event_id
def
room_version_to_event_format
(
room_version
):
"""
Converts a room version string to the event format
Args:
room_version (str)
Returns:
int
Raises:
UnsupportedRoomVersionError if the room version is unknown
"""
v
=
KNOWN_ROOM_VERSIONS
.
get
(
room_version
)
if
not
v
:
# this can happen if support is withdrawn for a room version
raise
UnsupportedRoomVersionError
()
return
v
.
event_format
def
event_type_from_format_version
(
format_version
):
"""
Returns the python type to use to construct an Event object for the
given event format version.
...
...
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