mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-10-01 08:25:44 -04:00
Merge branch 'develop' of github.com:matrix-org/synapse into stream_refactor
This commit is contained in:
commit
3df5cb804f
@ -19,8 +19,7 @@ from twisted.internet import defer
|
|||||||
|
|
||||||
from synapse.api.constants import Membership
|
from synapse.api.constants import Membership
|
||||||
from synapse.api.errors import AuthError, StoreError, Codes
|
from synapse.api.errors import AuthError, StoreError, Codes
|
||||||
from synapse.api.events.room import (RoomTopicEvent, RoomMemberEvent,
|
from synapse.api.events.room import RoomMemberEvent
|
||||||
MessageEvent, FeedbackEvent)
|
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
@ -19,9 +19,6 @@ from twisted.internet import defer
|
|||||||
|
|
||||||
from synapse.api.errors import EventStreamError
|
from synapse.api.errors import EventStreamError
|
||||||
from synapse.api.events import SynapseEvent
|
from synapse.api.events import SynapseEvent
|
||||||
from synapse.api.events.room import (
|
|
||||||
RoomMemberEvent, MessageEvent, FeedbackEvent, RoomTopicEvent
|
|
||||||
)
|
|
||||||
from synapse.api.streams import PaginationStream, StreamData
|
from synapse.api.streams import PaginationStream, StreamData
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
@ -175,7 +175,7 @@ class FederationHandler(BaseHandler):
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
yield self.store.store_room(
|
yield self.store.store_room(
|
||||||
event.room_id,
|
room_id,
|
||||||
"",
|
"",
|
||||||
is_public=False
|
is_public=False
|
||||||
)
|
)
|
||||||
|
@ -674,7 +674,7 @@ class PresenceHandler(BaseHandler):
|
|||||||
|
|
||||||
def push_update_to_clients(self, observer_user, observed_user,
|
def push_update_to_clients(self, observer_user, observed_user,
|
||||||
statuscache):
|
statuscache):
|
||||||
state = statuscache.make_event(user=observed_user, clock=self.clock)
|
statuscache.make_event(user=observed_user, clock=self.clock)
|
||||||
|
|
||||||
self.notifier.on_new_user_event(
|
self.notifier.on_new_user_event(
|
||||||
observer_user.to_string(),
|
observer_user.to_string(),
|
||||||
|
@ -20,8 +20,7 @@ from synapse.types import UserID, RoomAlias, RoomID
|
|||||||
from synapse.api.constants import Membership
|
from synapse.api.constants import Membership
|
||||||
from synapse.api.errors import RoomError, StoreError, SynapseError
|
from synapse.api.errors import RoomError, StoreError, SynapseError
|
||||||
from synapse.api.events.room import (
|
from synapse.api.events.room import (
|
||||||
RoomTopicEvent, MessageEvent, InviteJoinEvent, RoomMemberEvent,
|
RoomTopicEvent, RoomMemberEvent, RoomConfigEvent
|
||||||
RoomConfigEvent
|
|
||||||
)
|
)
|
||||||
from synapse.api.streams.event import EventStream, EventsStreamData
|
from synapse.api.streams.event import EventStream, EventsStreamData
|
||||||
from synapse.handlers.presence import PresenceStreamData
|
from synapse.handlers.presence import PresenceStreamData
|
||||||
@ -29,7 +28,6 @@ from synapse.util import stringutils
|
|||||||
from ._base import BaseHandler
|
from ._base import BaseHandler
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
import json
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
@ -303,8 +301,6 @@ class MessageHandler(BaseHandler):
|
|||||||
except:
|
except:
|
||||||
logger.exception("Failed to get snapshot")
|
logger.exception("Failed to get snapshot")
|
||||||
|
|
||||||
user = self.hs.parse_userid(user_id)
|
|
||||||
|
|
||||||
ret = {"rooms": rooms_ret, "presence": presence[0], "end": now_token}
|
ret = {"rooms": rooms_ret, "presence": presence[0], "end": now_token}
|
||||||
|
|
||||||
# logger.debug("snapshot_all_rooms returning: %s", ret)
|
# logger.debug("snapshot_all_rooms returning: %s", ret)
|
||||||
|
@ -249,7 +249,7 @@ class FeedbackRestServlet(RestServlet):
|
|||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def on_GET(self, request, room_id, msg_sender_id, msg_id, fb_sender_id,
|
def on_GET(self, request, room_id, msg_sender_id, msg_id, fb_sender_id,
|
||||||
feedback_type):
|
feedback_type):
|
||||||
user = yield (self.auth.get_user_by_req(request))
|
yield (self.auth.get_user_by_req(request))
|
||||||
|
|
||||||
# TODO (erikj): Implement this?
|
# TODO (erikj): Implement this?
|
||||||
raise NotImplementedError("Getting feedback is not supported")
|
raise NotImplementedError("Getting feedback is not supported")
|
||||||
|
@ -16,8 +16,9 @@
|
|||||||
from twisted.internet import defer
|
from twisted.internet import defer
|
||||||
|
|
||||||
from synapse.api.events.room import (
|
from synapse.api.events.room import (
|
||||||
RoomMemberEvent, MessageEvent, RoomTopicEvent, FeedbackEvent,
|
RoomMemberEvent, RoomTopicEvent, FeedbackEvent,
|
||||||
RoomConfigEvent, RoomNameEvent,
|
# RoomConfigEvent,
|
||||||
|
RoomNameEvent,
|
||||||
)
|
)
|
||||||
|
|
||||||
from synapse.util.logutils import log_function
|
from synapse.util.logutils import log_function
|
||||||
|
@ -15,11 +15,7 @@
|
|||||||
|
|
||||||
from twisted.internet import defer
|
from twisted.internet import defer
|
||||||
|
|
||||||
from ._base import SQLBaseStore, Table
|
from ._base import SQLBaseStore
|
||||||
from synapse.api.events.room import FeedbackEvent
|
|
||||||
|
|
||||||
import collections
|
|
||||||
import json
|
|
||||||
|
|
||||||
|
|
||||||
class FeedbackStore(SQLBaseStore):
|
class FeedbackStore(SQLBaseStore):
|
||||||
|
@ -18,12 +18,10 @@ from twisted.internet import defer
|
|||||||
from sqlite3 import IntegrityError
|
from sqlite3 import IntegrityError
|
||||||
|
|
||||||
from synapse.api.errors import StoreError
|
from synapse.api.errors import StoreError
|
||||||
from synapse.api.events.room import RoomTopicEvent
|
|
||||||
|
|
||||||
from ._base import SQLBaseStore, Table
|
from ._base import SQLBaseStore, Table
|
||||||
|
|
||||||
import collections
|
import collections
|
||||||
import json
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
@ -15,15 +15,10 @@
|
|||||||
|
|
||||||
from twisted.internet import defer
|
from twisted.internet import defer
|
||||||
|
|
||||||
from synapse.types import UserID
|
from ._base import SQLBaseStore
|
||||||
|
|
||||||
from synapse.api.constants import Membership
|
from synapse.api.constants import Membership
|
||||||
from synapse.api.events.room import RoomMemberEvent
|
|
||||||
|
|
||||||
from ._base import SQLBaseStore, Table
|
|
||||||
|
|
||||||
|
|
||||||
import collections
|
|
||||||
import json
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
@ -37,10 +37,8 @@ from twisted.internet import defer
|
|||||||
|
|
||||||
from ._base import SQLBaseStore
|
from ._base import SQLBaseStore
|
||||||
from synapse.api.errors import SynapseError
|
from synapse.api.errors import SynapseError
|
||||||
from synapse.api.constants import Membership
|
|
||||||
from synapse.util.logutils import log_function
|
from synapse.util.logutils import log_function
|
||||||
|
|
||||||
import json
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user