summary refs log tree commit diff
path: root/synapse/state.py (unfollow)
Commit message (Collapse)AuthorFilesLines
2016-04-10Support PyPyTimePath17-22/+22
2016-04-08Remove some unused functions (#711)Mark Haines15-485/+4
* Remove some unused functions * get_room_events_stream is only used in tests * is_exclusive_room might actually be something we want
2016-04-08Move all the wrapper functions for distributor.fireMark Haines5-39/+24
Move the functions inside the distributor and import them where needed. This reduces duplication and makes it possible for flake8 to detect when the functions aren't used in a given file.
2016-04-08changed_presencelike_data isn't observed anywhere in synapse so can be removedMark Haines1-15/+0
2016-04-07Call profile handler get_displayname directly rather than using ↵Mark Haines2-37/+1
collect_presencelike_data
2016-04-07Add tests for redactionsMark Haines4-5/+54
2016-04-07Add sensible __eq__ operators inside the tests.Mark Haines2-10/+28
Rather than adding them globally. This limits the changes to only affect the tests.
2016-04-07Rename thingsErik Johnston1-5/+5
2016-04-07Log contexts and squash things togetherErik Johnston1-17/+15
2016-04-07Add commentErik Johnston1-0/+8
2016-04-07Deduplicate joinsErik Johnston4-1/+118
2016-04-07Add tests for get_latest_event_ids_in_room and get_current_stateMark Haines3-0/+76
2016-04-07Add myself to AUTHORS.rstChristoph Witzany1-0/+3
Signed-off-by: Christoph Witzany <christoph@web.crofting.com>
2016-04-07Set profile information when joining rooms remotelyErik Johnston1-0/+5
2016-04-06fix check for failed authenticationChristoph Witzany1-2/+4
2016-04-06remove lineChristoph Witzany1-1/+0
2016-04-06make tests for ldap more specific to not be fooled by MocksChristoph Witzany1-3/+3
2016-04-06output ldap version for info and to pacify pep8Christoph Witzany1-0/+2
2016-04-06conditionally import ldapChristoph Witzany2-3/+5
2016-04-06fix pep8Christoph Witzany1-2/+1
2016-04-06fix exception handlingChristoph Witzany1-2/+2
2016-04-06code styleChristoph Witzany1-6/+13
2016-04-06cleanupChristoph Witzany1-5/+0
2016-04-06add tls property and twist my head around twistedChristoph Witzany1-15/+29
2016-04-06add tls propertyChristoph Witzany1-6/+10
2016-04-06move LDAP authentication to AuthenticationHandlerChristoph Witzany2-61/+48
2016-04-06Introduce LDAP authenticationChristoph Witzany4-1/+111
2016-04-06Test that room membership is replicatedMark Haines2-11/+67
2016-04-06Let users see their own leave eventsRichard van der Hoff1-11/+40
... otherwise clients get confused. Fixes https://matrix.org/jira/browse/SYN-662, https://github.com/vector-im/vector-web/issues/368
2016-04-06Add a slaved events store classMark Haines10-2/+485
Add a test to check that get_room_names_and_aliases does the same thing on both the master and on the slave data store.
2016-04-06Don't require config to create databaseErik Johnston13-86/+69
2016-04-06Make the cache objects be per instance rather than being globalMark Haines4-26/+29
2016-04-06Move _get_cache_dict into the SQLBaseStoreMark Haines2-33/+34
2016-04-06TestsErik Johnston1-2/+29
2016-04-05Don't backfill from selfErik Johnston1-1/+4
2016-04-05Separate generating the replication response...Mark Haines1-44/+55
from doing the http request parsing to make it easier to write unit tests for replication.
2016-04-05Fix stuck invitesErik Johnston4-16/+58
If rejecting a remote invite fails with an error response don't fail the entire request; instead mark the invite as locally rejected. This fixes the bug where users can get stuck invites which they can neither accept nor reject.
2016-04-04Docs and indentsErik Johnston3-14/+31
2016-04-04Add upgrade path, rename tableErik Johnston2-6/+20
2016-04-04Store invites in a separate table.Erik Johnston5-32/+124
2016-04-01Use computed prev event idsErik Johnston4-13/+41
2016-04-01Remove state hack from _create_new_client_eventErik Johnston1-43/+0
2016-04-01Do checks for memberships before creating eventsErik Johnston3-98/+151
2016-04-01Use google style doc strings.Mark Haines14-169/+242
pycharm supports them so there is no need to use the other format. Might as well convert the existing strings to reduce the risk of people accidentally cargo culting the wrong doc string format.
2016-04-01Assert that the step != 0Mark Haines1-0/+1
2016-04-01use google style doc stringsMark Haines1-11/+12
2016-04-01CommentErik Johnston1-1/+1
2016-04-01Add concurrently_execute functionErik Johnston4-75/+82
2016-04-01Rename direction to step, apply checks consistentlyMark Haines2-16/+16
2016-04-01Use a stream id generator for backfilled idsMark Haines11-61/+69
2016-04-01Filter rooms list before chunkingErik Johnston1-6/+12
2016-04-01Fix the invalidation of the names and aliases cacheMark Haines1-1/+1
2016-03-31Remove outlier parameter from compute_event_contextMark Haines3-11/+7
Use event.internal_metadata.is_outlier instead.
2016-03-31Move the check for backfilled outside the for loopMark Haines1-5/+5
2016-03-31Remove the is_new_state argument to persist event.Mark Haines3-56/+57
Move the checks for whether an event is new state inside persist event itself. This was harder than expected because there wasn't enough information passed to persist event to correctly handle invites from remote servers for new rooms.
2016-03-31Split out RoomMemberHandlerErik Johnston3-603/+651
2016-03-31Line lengthErik Johnston1-1/+3
2016-03-31Use a namedtuple rather than tuple unpackingMark Haines2-12/+15
2016-03-31Allow clock to be passed in to funcErik Johnston1-3/+3
2016-03-31Don't ignore the obey overlay if the rule has an enabled attribute of FalseDavid Baker1-2/+3
Fixes https://github.com/vector-im/vector-web/issues/1244
2016-03-31Read from DNS cache if within TTLErik Johnston2-17/+27
2016-03-30spell out more packagesMatthew Hodgson1-8/+21
2016-03-30typoMatthew Hodgson1-1/+1
2016-03-30Add replication streams for ex outliers and current state resetsMark Haines3-2/+113
2016-03-30return the state_group for backfillMark Haines1-1/+2
2016-03-30Add a entry to current_state_resets table when the current state is resetMark Haines1-0/+9
2016-03-30Add a replication stream for state groupsMark Haines4-11/+91
2016-03-30Only forget room if you were in the roomErik Johnston1-1/+2
2016-03-30Remove spurious commentErik Johnston1-1/+0
2016-03-30Use a stream id generator to assign state group idsMark Haines4-50/+60
2016-03-30Bump version and changelogErik Johnston2-1/+6
2016-03-30Require user to have left room to forget roomErik Johnston2-6/+54
This dramatically simplifies the forget API code - in particular it no longer generates a leave event.
2016-03-29Add new authorNiklas Riekenbrauck1-2/+5
2016-03-29Add JWT supportNiklas Riekenbrauck4-1/+93
2016-03-24Fix typoMark Haines1-1/+1
2016-03-24Add a response cache for getting the public room listMark Haines1-1/+11
2016-03-24Deduplicate identical /sync requestsMark Haines3-1/+64
2016-03-24Never notify for member events. This fixes ↵David Baker1-20/+21
https://github.com/vector-im/vector-web/issues/828
2016-03-23Bump version and changelog v0.14.0-rc2 github/release-v0.14.0 release-v0.14.0Erik Johnston2-1/+22
2016-03-23Simplify intern_dictErik Johnston1-17/+10
2016-03-23Don't bother interning keys that are already internedErik Johnston1-3/+1
2016-03-23Intern all the thingsErik Johnston8-45/+97
2016-03-23Intern sender, event_id and room_id in eventsErik Johnston1-0/+5
2016-03-23Intern type and state_key on eventsErik Johnston1-0/+7
2016-03-23String internErik Johnston2-3/+17
2016-03-23Comment about weird SQLErik Johnston1-1/+3
2016-03-23SQLite and postgres doesn't share a true literalErik Johnston1-1/+1
2016-03-23Ensure all old public rooms have aliasesErik Johnston2-4/+26
2016-03-23Ensure published rooms have public join rulesErik Johnston1-0/+7
2016-03-23CommentErik Johnston1-0/+3
2016-03-23Don't cache events in get_recent_events_for_roomErik Johnston1-14/+19
2016-03-23Don't cache events in get_current_state_for_keyErik Johnston2-9/+11
2016-03-23Don't require alias in public room list.Erik Johnston1-14/+13
Rooms now no longer require an alias to be published. Also, changes the way we pull out state of each room to not require fetching all state events.
2016-03-23Make get_invites return RoomsForUserErik Johnston2-7/+5
2016-03-23Reduce cache sizeErik Johnston1-1/+1
2016-03-22Key StateHandler._state_cache off of state groupsErik Johnston1-40/+21
2016-03-22Make LruCache use a dedicated _Node classErik Johnston1-32/+41
2016-03-22Make StateHandler._state_cache only store event_ids.Erik Johnston2-7/+42
2016-03-22Measure StateHandler._resolve_eventsErik Johnston1-38/+40
2016-03-22Bump get_unread_event_push_actions_by_room_for_user cacheErik Johnston1-1/+1
2016-03-22Bump get_aliases_for_room cacheErik Johnston1-1/+1
2016-03-22Use get_users_in_room to count the number of room members rather than using ↵Mark Haines1-1/+3
read_receipts
2016-03-22Don't cache events in _state_group_cacheErik Johnston1-60/+48
Instead, simply cache the event ids, relying on the event cache to cache the actual events. The problem was that while the state groups cache was limited in the number of groups it could hold, each individual group could consist of thousands of events.
2016-03-22Doc stringErik Johnston1-0/+6
2016-03-22Make stateGroupCache honour CACHE_SIZE_FACTORErik Johnston1-1/+7
2016-03-22an invalide is something else...Matthew Hodgson1-1/+1
2016-03-21Remove unused backfilled parameter from persist_eventMark Haines3-42/+19
2016-03-21Add published room list edit APIErik Johnston4-4/+116
2016-03-21remove unused current_state variable from on_receive_pduMark Haines1-2/+0
2016-03-18Catch exceptions from EDU handlingErik Johnston1-1/+6
2016-03-18Don't assume existence of event_id in __str__Erik Johnston1-1/+3
2016-03-18Dedupe requested event list in _get_eventsErik Johnston1-14/+12
2016-03-18Yield on EDU handlingErik Johnston1-3/+4
2016-03-17Check canonical alias event existsErik Johnston1-1/+2
2016-03-17Remove another unused function from presenceMark Haines1-4/+0
2016-03-17Update aliases event after deletionErik Johnston2-7/+48
Attempt to update the appropriate `m.room.aliases` event after deleting an alias. This may fail due to the deleter not being in the room. Will also check if the canonical alias of the event is set to the deleted alias, and if so will attempt to delete it.
2016-03-17Remove dead code left over from presence changesMark Haines4-108/+0
2016-03-17Add option to definitions.py to search for functions a function refers toMark Haines1-1/+22
2016-03-16remove debug loggingDavid Baker1-3/+0
2016-03-16Unused importDavid Baker1-1/+0
2016-03-16Make registration idempotent, part 2: be idempotent if the client specifies ↵David Baker3-6/+42
a username.
2016-03-16pep8David Baker1-1/+2
2016-03-16time_msec()David Baker1-1/+1
2016-03-16string with symbols is a bit too symboly.David Baker1-1/+1
2016-03-16Replace other time.time().David Baker1-2/+1
2016-03-16Use hs get_clock instead of time.time()David Baker1-2/+2
2016-03-16take extra return val from check_auth in account tooDavid Baker1-1/+1
2016-03-16Fix testsDavid Baker1-4/+5
2016-03-16pep8 & remove debug loggingDavid Baker2-5/+6
2016-03-16Make registration idempotent: if you specify the same session, make it give ↵David Baker2-13/+74
you an access token for the user that was registered on previous uses of that session. Tweak the UI auth layer to not delete sessions when their auth has completed and hence expire themn so they don't hang around until server restart. Allow server-side data to be associated with UI auth sessions.
2016-03-16Clarify that we do have reset functionality via the ISRichard van der Hoff1-21/+20
2016-03-16Add a comment to offer a hint to an explanation for why we have a unique ↵Mark Haines1-0/+1
constraint on (app_id, pushkey, user_id)
2016-03-16Password reset docs and scriptRichard van der Hoff3-1/+59
Replace the bash/perl gen_password script with a python one, and write a note on how to use it.
2016-03-15Fix a couple of errors when deleting pushersMark Haines1-2/+2
2016-03-15Hook up adding a pusher to the notifier for replication.Mark Haines2-0/+12
2016-03-15Add replication stream for pushersMark Haines6-18/+107
2016-03-15Remove needless PreserveLoggingContextErik Johnston1-5/+4
2016-03-15Persist rejection of invites over federationErik Johnston1-1/+17
2016-03-15English v0.14.0-rc1Erik Johnston1-1/+1
2016-03-15Bump version and changelogErik Johnston2-1/+40
2016-03-14Add config to create guest account on 3pid inviteErik Johnston2-25/+36
Currently, when a 3pid invite request is sent to an identity server, it includes a provisioned guest access token. This allows the link in the, say, invite email to include the guest access token ensuring that the same account is used each time the link is clicked. This flow has a number of flaws, including when using different servers or servers that have guest access disabled. For now, we keep this implementation but hide it behind a config option until a better flow is implemented.
2016-03-14Return list, not generator.Erik Johnston1-3/+1
2016-03-14Fix regression where synapse checked whether push rules were valid JSON ↵Mark Haines2-6/+19
before the compatibility hack that handled clients sending invalid JSON
2016-03-11Thats not how transactions work.Erik Johnston1-13/+16
2016-03-11Use parse_json_object_from_request to parse JSON out of request bodiesMark Haines11-90/+49
2016-03-11Implement logoutErik Johnston3-14/+109
2016-03-11Fix SQL statementErik Johnston1-1/+1
2016-03-11more pep8David Baker1-1/+1
2016-03-11Make select more sensible when dseleting access tokens, rename pusher ↵David Baker3-7/+5
deletion to match access token deletion and make exception arg optional.
2016-03-11Delete old, unused methods and rename new one to just be ↵David Baker2-16/+3
`user_delete_access_tokens` with an `except_token_ids` argument doing what it says on the tin.
2016-03-11Dear PyCharm, please indent sensibly for me. Thx.David Baker2-3/+3
2016-03-11Fix cache invalidation so deleting access tokens (which we did when changing ↵David Baker4-17/+34
password) actually takes effect without HS restart. Reinstate the code to avoid logging out the session that changed the password, removed in 415c2f05491ce65a4fc34326519754cd1edd9c54
2016-03-11Make key client send a Host headerErik Johnston1-0/+3
2016-03-10Store appservice ID on registerDaniel Wagner-Hall2-7/+38
2016-03-10Update users table in a batched mannerErik Johnston1-9/+14
2016-03-10Flake8 fixblide1-6/+6
2016-03-10Register endpoint returns refresh_tokenblide2-17/+26
Guest registration still doesn't return refresh_token
2016-03-09Add commentErik Johnston1-0/+3
2016-03-09Return the correct token formErik Johnston1-1/+1
2016-03-09Use topological orders for initial sync timelineErik Johnston1-2/+2
2016-03-09Pin pysaml2 version to 3.xErik Johnston1-1/+1
This is due to the fact that `from saml2 import config` fails in version 4.x
2016-03-09Add a parse_json_object functionMark Haines11-121/+97
to deduplicate all the copy+pasted _parse_json functions. Also document the parse_.* functions.
2016-03-09Ensure integer is an integerErik Johnston1-1/+1
2016-03-09Reinstate coverage checks for integ testsRichard van der Hoff2-2/+4
2016-03-09Specify synapse-directory for integ testsRichard van der Hoff2-2/+6
2016-03-08Only build py27 tox env for integ testsRichard van der Hoff2-2/+2
2016-03-08Use sytest build scripts, rather than reinventing the wheelRichard van der Hoff2-52/+7
2016-03-08Idempotent-ise schema update scriptDaniel Wagner-Hall1-1/+5
If any ASes don't have an ID, the schema will fail, and then it will error when trying to add the column again.
2016-03-08Fix relative imports so they work in both py3 and py27Mark Haines17-22/+22
2016-03-08pep8David Baker1-2/+5
2016-03-08Encode unicode objects given to post_urlencode* otherwise urllib.urlencode ↵David Baker1-2/+12
chokes.
2016-03-07Use syntax that works on both py2.7 and py3Mark Haines8-10/+10
2016-03-07Fix testsDavid Baker3-20/+20
2016-03-07Send the user ID matching the guest access token, since there is no Matrix ↵David Baker2-2/+7
API to discover what user ID an access token is for.
2016-03-04Send history visibility on boundary changesErik Johnston1-0/+26
2016-03-04Prefill from the correct streamMark Haines1-1/+1
2016-03-04prefill the push rules stream change cacheMark Haines1-2/+9
2016-03-04s/stream_ordering/event_stream_ordering/ in pushMark Haines3-27/+31
2016-03-04/FNARG/dMark Haines1-1/+0
2016-03-04Always include kicks and bans in full /syncErik Johnston1-3/+9
2016-03-04SpellingErik Johnston1-1/+1
2016-03-04Fix unit testsMark Haines1-2/+2
2016-03-04Hook up the push rules stream to account_data in /syncMark Haines4-69/+85
2016-03-04Add profile information to invitesErik Johnston3-3/+17
2016-03-04tests/utils: added room_invite_state_types to test configPatrik Oldsberg1-0/+1
Signed-off-by: Patrik Oldsberg <patrik.oldsberg@ericsson.com>
2016-03-04config,handlers/_base: added homeserver config for what state is included in ↵Patrik Oldsberg3-7/+44
a room invite Signed-off-by: Patrik Oldsberg <patrik.oldsberg@ericsson.com>
2016-03-04