summary refs log tree commit diff
path: root/synapse/events (unfollow)
Commit message (Collapse)AuthorFilesLines
2016-03-03jenkins.sh: set -xRichard van der Hoff1-1/+3
Also move the options from the shebang line to the body of the script, so that they take effect even if somebody explicitly runs "bash jenkins.sh"
2016-03-02add 800x600 thumbnails to make vector look prettier (and anyone else who ↵Matthew Hodgson1-0/+3
likes big thumbnails)
2016-03-02Set SYNAPSE_CACHE_FACTOR=1 in jenkinsErik Johnston1-0/+1
2016-03-02Add SYNAPSE_CACHE_FACTOR to READMEErik Johnston1-1/+18
2016-03-01Add a /replication API for extracting the updates that happened onMark Haines15-4/+846
synapse This is necessary for replicating the data in synapse to be visible to a separate service because presence and typing notifications aren't stored in a database so won't be visible to another process. This API can be used to either get the raw data by requesting the tables themselves or to just receive notifications for updates by following the streams meta-stream. Returns updates for each table requested a JSON array of arrays with a row for each row in the table. Each table is prefixed by a header row with the: name of the table, current stream_id position for the table, number of rows, number of columns and the names of the columns. This is followed by the rows that have been added to the server since the requester last asked. The API has a timeout and is hooked up to the notifier so that a slave can long poll for updates.
2016-03-01Load the current id in the IdGenerator constructorMark Haines12-77/+52
Rather than loading them lazily. This allows us to remove all the yield statements and spurious arguments for the get_next methods. It also allows us to replace all instances of get_next_txn with get_next since get_next no longer needs to access the db.
2016-03-01Limit stream change cache size tooErik Johnston1-1/+5
2016-03-01Move cache size fiddling to descriptors only. Fix testsErik Johnston2-7/+9
2016-03-01Add enviroment variable SYNAPSE_CACHE_FACTOR, default it to 0.1Erik Johnston3-2/+10
2016-03-01Reraise exceptionErik Johnston1-0/+1
2016-03-01Correct cache miss detectionErik Johnston1-1/+1
2016-02-26Add support for changing the actions for default rulesMark Haines3-11/+102
See matrix-org/matrix-doc#283 Works by adding dummy rules to the push rules table with a negative priority class and then using those rules to clobber the default rule actions when adding the default rules in ``list_with_base_rules``
2016-02-26Fix to appease the PEP8 dragonGergely Polonkai1-1/+3
2016-02-26Add error codes for malformed/bad JSON in /loginGergely Polonkai1-2/+2
Signed-off-by: Gergely Polonkai <gergely@polonkaieu>
2016-02-25Send the invier's member event in room invite state so the invitee has their ↵David Baker1-1/+7
display name and avatar.
2016-02-25Make sure we return a JSON object when returning the values of specif…Mark Haines1-1/+3
…ic keys from a push rule
2016-02-24Remove unused get_rule_attr methodMark Haines1-8/+0
2016-02-24Generate guest access token on 3pid invitesDaniel Wagner-Hall4-0/+91
This means that following the same link across multiple sessions or devices can re-use the same guest account. Note that this is somewhat of an abuse vector; we can't throw up captchas on this flow, so this is a way of registering ephemeral accounts for spam, whose sign-up we don't rate limit.
2016-02-24Ignore invalid POST bodies when joining roomsDaniel Wagner-Hall1-2/+12
2016-02-23Report size of ExpiringCacheErik Johnston1-2/+13
2016-02-23Create a new stream_id per presence updateErik Johnston1-6/+9
2016-02-23Check presence token interval is less than 100, rather than the token itselfErik Johnston1-4/+4
2016-02-23Set WORKSPACE if not setDaniel Wagner-Hall1-0/+2
2016-02-23Allow third_party_signed to be specified on /joinDaniel Wagner-Hall7-54/+196
2016-02-23Handle get_all_entities_changed returning NoneErik Johnston1-0/+3
2016-02-23Add commentsErik Johnston1-0/+4
2016-02-23Change the way we figure out presence updates for small deltasErik Johnston2-17/+52
2016-02-23Don't include defer.returnValue in Measure blockErik Johnston1-9/+12
2016-02-23Measure PresenceEventSource.get_new_eventsErik Johnston1-34/+35
2016-02-23handlers/sync: style fix, line too longPatrik Oldsberg1-1/+5
Signed-off-by: Patrik Oldsberg <patrik.oldsberg@ericsson.com>
2016-02-23Pick up currently_active across federationErik Johnston1-0/+1
2016-02-23handlers/sync: fix SyncResult not counting account_data change when ↵Patrik Oldsberg1-1/+1
converting to bool This fixes account_data events not triggering an immediate /sync response Signed-off-by: Patrik Oldsberg <patrik.oldsberg@ericsson.com>
2016-02-22Check that the disable_registration config key is handled correctlyMark Haines1-0/+21
2016-02-22address review commentsRichard van der Hoff1-7/+2
drop commented-out special casing for historyvisibility event s/he/they/ for users
2016-02-22Add a test for TreeCache.__contains__Mark Haines2-0/+9
2016-02-22Remove superfluous call to get_state_at when we already have an event for ↵Erik Johnston1-4/+12
that stream position
2016-02-19Test Filter.filter_roomsMark Haines1-0/+18
Also check that the __repr__ method for FilterCollection does something sensible.
2016-02-19Interpret unknown visibilities the same as sharedRichard van der Hoff1-11/+13
2016-02-19Fix flake8 warnings for testsMark Haines39-364/+359
2016-02-19Correctly filter statesErik Johnston1-2/+2
2016-02-19Only send presence updates to remote hosts if user is oursErik Johnston1-2/+10
2016-02-19Add Measures to presenceErik Johnston1-57/+62
2016-02-19Allow guest users access to messages in rooms they have joinedRichard van der Hoff3-14/+42
There should be no difference between guest users and non-guest users in terms of access to messages. Define the semantics of the is_peeking argument to filter_events_for_clients (slightly) better; interpret it appropriately, and set it correctly from /sync.
2016-02-19Add presence metricErik Johnston1-0/+3
2016-02-19Remove spurious extra metricsErik Johnston1-1/+0
2016-02-19Don't set currently_active for remote presenceErik Johnston2-10/+27
2016-02-19More metricsErik Johnston1-0/+6
2016-02-19Add presence metricsErik Johnston2-0/+14
2016-02-18"You are not..."Erik Johnston1-1/+1
2016-02-18Close cursorErik Johnston1-0/+1
2016-02-18Remove unused param from get_max_tokenErik Johnston6-13/+11
2016-02-18WheelTimer: Don't scan list, use index.Erik Johnston1-5/+8
2016-02-18Remove dead code for setting device specific rules.Mark Haines10-141/+45
It wasn't possible to hit the code from the API because of a typo in parsing the request path. Since no-one was using the feature we might as well remove the dead code.
2016-02-18Remove invalid arg.Erik Johnston1-1/+0
2016-02-18Add unit testErik Johnston2-93/+560
2016-02-18Review commentsDaniel Wagner-Hall3-7/+7
2016-02-18Remove old tests.Erik Johnston6-2098/+0
2016-02-18Add stuff pulled from the DB to the cacheErik Johnston1-2/+4
2016-02-18PEP8Erik Johnston1-2/+2
2016-02-18Prefix TS fields with _tsErik Johnston4-43/+44
2016-02-18Remove status_msg when going offline. Don't offline -> online if you send a ↵Erik Johnston1-5/+15
message
2016-02-18Check presence state is a valid oneErik Johnston2-1/+6
2016-02-18Move if statementErik Johnston1-8/+8
2016-02-18CommentErik Johnston1-0/+2
2016-02-17Some cleanupDaniel Wagner-Hall2-69/+61
I'm not particularly happy with the "action" switching, but there's no convenient way to defer the work that needs to happen after it, so... :(
2016-02-17Remove spurious commentErik Johnston1-1/+0
2016-02-17Initial cutErik Johnston16-1136/+933
2016-02-17Respond to federated invite with non-empty contextDaniel Wagner-Hall3-46/+65
Currently, we magically perform an extra database hit to find the inviter, and use this to guess where we should send the event. Instead, fill in a valid context, so that other callers relying on the context actually have one.
2016-02-17Add wheeltimer implErik Johnston2-0/+162
2016-02-17api/filtering: don't assume that event content will always be a dictPatrik Oldsberg1-1/+4
Signed-off-by: Patrik Oldsberg <patrik.oldsberg@ericsson.com>
2016-02-17client/v1/room: include event_id in response to state event PUT, in ↵Patrik Oldsberg1-2/+2
accordance with the spec Signed-off-by: Patrik Oldsberg <patrik.oldsberg@ericsson.com>
2016-02-16Some cleanup, some TODOs, more to doDaniel Wagner-Hall1-68/+60
2016-02-16Fix typo in request validation for adding push rules.Mark Haines1-1/+1
2016-02-16Make adding push rules idempotentMark Haines1-82/+86
Also remove the **kwargs from the add_push_rule method. Fixes https://matrix.org/jira/browse/SYN-391
2016-02-16Some cleanupDaniel Wagner-Hall2-23/+30
2016-02-16Tidy? up room creation event sendingDaniel Wagner-Hall1-63/+72
2016-02-16Add commentDaniel Wagner-Hall1-1/+1
2016-02-15Branch off member and non member sendsDaniel Wagner-Hall5-74/+99
Unclean, needs tidy-up, but works
2016-02-15Simplify room creation codeDaniel Wagner-Hall2-52/+28
2016-02-15Simplify room creation codeDaniel Wagner-Hall2-55/+31
2016-02-15Use update_membership for profile updatesDaniel Wagner-Hall2-20/+12
2016-02-15Use update_membership to kick guestsDaniel Wagner-Hall2-16/+19
2016-02-15Reuse update_membership from /joinDaniel Wagner-Hall2-19/+14
2016-02-15Inline _do_local_membership_updateDaniel Wagner-Hall1-18/+7
2016-02-15Inline _do_join as it now only has one callerDaniel Wagner-Hall1-48/+47
Also, consistently apply rate limiting. Again, ugly, but a step in the right direction.
2016-02-15Merge implementation of /join by alias or IDDaniel Wagner-Hall5-70/+71
This code is kind of rough (passing the remote servers down a long chain), but is a step towards improvement.
2016-02-15Merge some room joining codepathsDaniel Wagner-Hall2-5/+11
Force joining by alias to go through the send_membership_event checks, rather than bypassing them straight into _do_join. This is the first of many stages of cleanup.
2016-02-12Revert "Merge two of the room join codepaths"Daniel Wagner-Hall5-73/+69
This reverts commit cf81375b94c4763766440471e632fc4b103450ab. It subtly violates a guest joining auth check
2016-02-12Merge two of the room join codepathsDaniel Wagner-Hall5-69/+73
There's at least one more to merge in. Side-effects: * Stop reporting None as displayname and avatar_url in some cases * Joining a room by alias populates guest-ness in join event * Remove unspec'd PUT version of /join/<room_id_or_alias> which has not been called on matrix.org according to logs * Stop recording access_token_id on /join/room_id - currently we don't record it on /join/room_alias; I can try to thread it through at some point.
2016-02-12Catch the exceptions thrown by twisted when you write to a closed connectionMark Haines5-11/+33
2016-02-12Mitigate against incorrect old state in /sync.Erik Johnston1-5/+12
There have been reports from the field that servers occasionally have incorrect notions of what the old state of a room is. This proves problematic as /sync relies on a correct old state. This patch makes /sync specifically include in the 'state' key any current state events that haven't been correctly included.
2016-02-11Enforce user_id exclusivity for AS registrationsDaniel Wagner-Hall1-5/+12
This whole set of checks is kind of an ugly mess, which I may clean up at some point, but for now let's be correct.
2016-02-11Mark AS users with their AS's IDDaniel Wagner-Hall10-36/+121
2016-02-11Bump version and changelogErik Johnston2-1/+6
2016-02-11Fix SYN-627, events are in incorrect room in /syncErik Johnston1-1/+1
2016-02-11Bump version and changelogErik Johnston2-1/+7
2016-02-11Return events in correct order for /eventsErik Johnston2-8/+12
2016-02-11Add some paranoia loggingErik Johnston1-0/+10
2016-02-100.13.1 v0.13.1Matthew Hodgson1-1/+1
2016-02-10bump for 0.13.1Matthew Hodgson1-0/+7
2016-02-10try to bump syweb to 0.6.8Matthew Hodgson1-1/+1
2016-02-10Update CHANGESErik Johnston1-2/+4
2016-02-10Bump version and changelogErik Johnston2-1/+23
2016-02-10Batch fetch _get_state_groups_from_groupsErik Johnston1-32/+34
2016-02-10Use _simple_select_many for _get_state_group_for_eventsErik Johnston2-17/+11
2016-02-10Only calculate initial sync for 10 rooms at a timeErik Johnston1-24/+29
This helps to ensure we don't completely starve other requests.
2016-02-10Remove commentErik Johnston1-1/+1
2016-02-10s/parent_context/previous_context/Erik Johnston1-9/+9
2016-02-10Set parent context on instansiationErik Johnston1-2/+7
2016-02-10Rename functionsErik Johnston2-4/+4
2016-02-09TypoErik Johnston1-1/+1
2016-02-09Atomically persit push actions when we persist the eventErik Johnston6-65/+49
2016-02-09Pass in current state to push action handlerErik Johnston3-27/+20
2016-02-09Fix testErik Johnston1-9/+1
2016-02-09Fix testErik Johnston1-3/+4
2016-02-09Change a log from debug to infoErik Johnston1-1/+1
2016-02-09Remove dead codeErik Johnston1-12/+0
2016-02-09Invalidate get_last_receipt_event_id_for_user cacheErik Johnston1-0/+5
2016-02-09Don't load all ephemeral state for a room on every syncErik Johnston2-14/+20
2016-02-09Fix unit testsErik Johnston2-5/+9
2016-02-09Remove pyc files before running testsDaniel Wagner-Hall1-1/+1
2016-02-09Revert "Reject additional path segments"Daniel Wagner-Hall3-6/+6
This reverts commit 1d19a5ec0fff73af9cee8c21118020b31be47379. iOS Console is apparently relying on these paths.
2016-02-09Measure some /sync related thingsErik Johnston2-150/+162
2016-02-09Revert to putting it around the entire blockErik Johnston1-124/+124
2016-02-09Don't create new logging contextErik Johnston1-12/+15
2016-02-09Don't bother copying records on parent contextErik Johnston1-8/+0
2016-02-09Fix bug in util.metrics.MeasureErik Johnston1-1/+3
2016-02-09Create new context when measuringErik Johnston1-2/+5
2016-02-09Don't measure across event stream call, as it lasts for a long time.Erik Johnston1-124/+124
2016-02-09Change logcontext warns to debugErik Johnston1-3/+3
2016-02-08Derive macaroon_secret_key from signing key.Erik Johnston2-16/+30
Unfortunately, there are people that are running synapse without a `macaroon_sercret_key` set. Mandating they set one is a good solution, except that breaking auto upgrades is annoying.
2016-02-08Fix up logcontextsErik Johnston31-229/+356
2016-02-08Add metrics to pushersErik Johnston3-31/+149
2016-02-08Reject additional path segmentsDaniel Wagner-Hall3-6/+6
2016-02-05Report the v1 and v2 patterns separatelyM