mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-10-01 08:25:44 -04:00
flake8
This commit is contained in:
parent
d892079844
commit
0127423027
@ -17,14 +17,13 @@ from ._base import BaseHandler
|
|||||||
|
|
||||||
from twisted.internet import defer
|
from twisted.internet import defer
|
||||||
|
|
||||||
from synapse.util.logcontext import PreserveLoggingContext
|
|
||||||
from synapse.util.async import Linearizer
|
from synapse.util.async import Linearizer
|
||||||
from synapse.types import get_domain_from_id
|
|
||||||
from synapse.api.errors import SynapseError
|
from synapse.api.errors import SynapseError
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
class ReadMarkerHandler(BaseHandler):
|
class ReadMarkerHandler(BaseHandler):
|
||||||
def __init__(self, hs):
|
def __init__(self, hs):
|
||||||
super(ReadMarkerHandler, self).__init__(hs)
|
super(ReadMarkerHandler, self).__init__(hs)
|
||||||
|
@ -83,7 +83,8 @@ class RoomAccountDataServlet(RestServlet):
|
|||||||
body = parse_json_object_from_request(request)
|
body = parse_json_object_from_request(request)
|
||||||
|
|
||||||
if account_data_type == "m.read_marker":
|
if account_data_type == "m.read_marker":
|
||||||
raise SynapseError(405,
|
raise SynapseError(
|
||||||
|
405,
|
||||||
"Cannot set m.read_marker through this API. "
|
"Cannot set m.read_marker through this API. "
|
||||||
"Use /rooms/!roomId:server.name/read_marker"
|
"Use /rooms/!roomId:server.name/read_marker"
|
||||||
)
|
)
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
|
|
||||||
from twisted.internet import defer
|
from twisted.internet import defer
|
||||||
|
|
||||||
from synapse.api.errors import SynapseError
|
|
||||||
from synapse.http.servlet import RestServlet, parse_json_object_from_request
|
from synapse.http.servlet import RestServlet, parse_json_object_from_request
|
||||||
from ._base import client_v2_patterns
|
from ._base import client_v2_patterns
|
||||||
|
|
||||||
@ -45,7 +44,7 @@ class ReadMarkerRestServlet(RestServlet):
|
|||||||
body = parse_json_object_from_request(request)
|
body = parse_json_object_from_request(request)
|
||||||
|
|
||||||
if "m.read" in body:
|
if "m.read" in body:
|
||||||
read_event_id = body["m.read"];
|
read_event_id = body["m.read"]
|
||||||
yield self.receipts_handler.received_client_receipt(
|
yield self.receipts_handler.received_client_receipt(
|
||||||
room_id,
|
room_id,
|
||||||
"m.read",
|
"m.read",
|
||||||
|
Loading…
Reference in New Issue
Block a user