Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Add helper to parse an enum from query args & use it. (#14956) | Patrick Cloke | 2023-02-01 | 1 | -9/+3 |
| | | | | | | | | The `parse_enum` helper pulls an enum value from the query string (by delegating down to the parse_string helper with values generated from the enum). This is used to pull out "f" and "b" in most places and then we thread the resulting Direction enum throughout more code. | ||||
* | Use an enum for direction. (#14927) | Patrick Cloke | 2023-01-27 | 1 | -3/+8 |
| | | | | For better type safety we use an enum instead of strings to configure direction (backwards or forwards). | ||||
* | Do not allow a None-limit on PaginationConfig. (#14146) | Patrick Cloke | 2022-10-14 | 1 | -7/+5 |
| | | | | | | | The callers either set a default limit or manually handle a None-limit later on (by setting a default value). Update the callers to always instantiate PaginationConfig with a default limit and then assume the limit is non-None. | ||||
* | Remove support for the unstable dir flag on relations. (#14106) | Patrick Cloke | 2022-10-07 | 1 | -2/+4 |
| | | | | | | From MSC3715, this was unused by clients (and there was no way for clients to know it was supported). Matrix 1.4 defines the stable field. | ||||
* | Use auto_attribs/native type hints for attrs classes. (#11692) | Patrick Cloke | 2022-01-13 | 1 | -5/+5 |
| | |||||
* | Remove unnecessary parentheses around tuples returned from methods (#10889) | Andrew Morgan | 2021-09-23 | 1 | -1/+1 |
| | |||||
* | Add a return type to parse_string. (#10438) | Patrick Cloke | 2021-07-21 | 1 | -7/+9 |
| | | | | And set the required attribute in a few places which will error if a parameter is not provided. | ||||
* | Remove redundant "coding: utf-8" lines (#9786) | Jonathan de Jong | 2021-04-14 | 1 | -1/+0 |
| | | | | | | | Part of #9744 Removes all redundant `# -*- coding: utf-8 -*-` lines from files, as python 3 automatically reads source code as utf-8 now. `Signed-off-by: Jonathan de Jong <jonathan@automatia.nl>` | ||||
* | Make token serializing/deserializing async (#8427) | Erik Johnston | 2020-09-30 | 1 | -4/+5 |
| | | | The idea is that in future tokens will encode a mapping of instance to position. However, we don't want to include the full instance name in the string representation, so instead we'll have a mapping between instance name and an immutable integer ID in the DB that we can use instead. We'll then do the lookup when we serialize/deserialize the token (we could alternatively pass around an `Instance` type that includes both the name and ID, but that turns out to be a lot more invasive). | ||||
* | Clean up types for PaginationConfig (#8250) | Erik Johnston | 2020-09-08 | 1 | -40/+21 |
| | | | This removes `SourcePaginationConfig` and `get_pagination_rows`. The reasoning behind this is that these generic classes/functions erased the types of the IDs it used (i.e. instead of passing around `StreamToken` it'd pass in e.g. `token.room_key`, which don't have uniform types). | ||||
* | Stop sub-classing object (#8249) | Patrick Cloke | 2020-09-04 | 1 | -2/+2 |
| | |||||
* | Fix some spelling mistakes / typos. (#7811) | Patrick Cloke | 2020-07-09 | 1 | -2/+2 |
| | |||||
* | Clean up newline quote marks around the codebase (#6362) | Andrew Morgan | 2019-11-21 | 1 | -3/+6 |
| | |||||
* | Remove unnecessary parentheses around return statements (#5931) | Andrew Morgan | 2019-08-30 | 1 | -1/+1 |
| | | | | | Python will return a tuple whether there are parentheses around the returned values or not. I'm just sick of my editor complaining about this all over the place :) | ||||
* | Run Black. (#5482) | Amber Brown | 2019-06-20 | 1 | -14/+13 |
| | |||||
* | Fix develop because I broke it :( (#3535) | Amber Brown | 2018-07-14 | 1 | -0/+3 |
| | |||||
* | Use parse_{int,str} and assert from http.servlet | Krombel | 2018-07-13 | 1 | -23/+6 |
| | | | | | | | parse_integer and parse_string can take a request and raise errors in case we have wrong or missing params. This PR tries to use them more to deduplicate some code and make it better readable | ||||
* | run isort | Amber Brown | 2018-07-09 | 1 | -3/+2 |
| | |||||
* | replace 'except:' with 'except Exception:' | Richard van der Hoff | 2017-10-23 | 1 | -3/+3 |
| | | | | what could possibly go wrong | ||||
* | Clamp pagination limits to at most 1000 | Erik Johnston | 2016-01-14 | 1 | -2/+5 |
| | |||||
* | copyrights | Matthew Hodgson | 2016-01-07 | 1 | -1/+1 |
| | |||||
* | Define __repr__ methods for StreamConfig and PaginationConfig | Mark Haines | 2015-09-22 | 1 | -3/+8 |
| | | | | So that they can be used with "%r" log formats. | ||||
* | Update copyright notices | Mark Haines | 2015-01-06 | 1 | -1/+1 |
| | |||||
* | Allow GET /room/:room_id/messages without 'limit' parameter to default to 10 | Paul "LeoNerd" Evans | 2014-12-02 | 1 | -1/+5 |
| | |||||
* | SYN-58: Allow passing explicit limit=0 to initialSync to request no messages ↵ | Paul "LeoNerd" Evans | 2014-11-20 | 1 | -6/+6 |
| | | | | at all; missing still implies default 10 | ||||
* | Construct a source-specific 'SourcePaginationConfig' to pass into ↵ | Paul "LeoNerd" Evans | 2014-10-29 | 1 | -0/+23 |
| | | | | get_pagination_rows; meaning each source doesn't have to care about its own name any more | ||||
* | fix the copyright holder from matrix.org to OpenMarket Ltd, as matrix.org ↵ | Matthew Hodgson | 2014-09-03 | 1 | -1/+1 |
| | | | | hasn't been incorporated in time for launch. | ||||
* | Add logging to try and figure out what is going on with the presence stuff | Erik Johnston | 2014-08-28 | 1 | -1/+1 |
| | |||||
* | Convert get_paginat_rows to use PaginationConfig. This allows people to ↵ | Erik Johnston | 2014-08-27 | 1 | -27/+40 |
| | | | | supply directions. | ||||
* | PEP8 tweaks. | Erik Johnston | 2014-08-27 | 1 | -4/+3 |
| | |||||
* | WIP: Completely change how event streaming and pagination work. This ↵ | Erik Johnston | 2014-08-26 | 1 | -0/+72 |
reflects the change in the underlying storage model. |