Erik Johnston
dfbf73408c
Merge pull request #2501 from matrix-org/dbkr/channel_notifications
...
Support for channel notifications
2017-10-11 13:19:29 +01:00
Erik Johnston
bc7f3eb32f
Merge pull request #2483 from jeremycline/unfreeze-ujson-dump
...
Unfreeze event before serializing with ujson
2017-10-11 13:18:52 +01:00
David Baker
81a5e0073c
pep8
2017-10-10 15:53:34 +01:00
David Baker
ab1bc9bf5f
Don't KeyError if no power_levels event
2017-10-10 15:34:05 +01:00
David Baker
0f1eb3e914
Use notification levels in power_levels
...
Rather than making the condition directly require a specific power
level. This way the level require to notify a room can be configured
per room.
2017-10-10 15:23:00 +01:00
Erik Johnston
84e27a592d
Merge pull request #2490 from matrix-org/erikj/drop_left_room_events
...
Ignore incoming events for rooms that we have left
2017-10-10 11:58:32 +01:00
David Baker
c9f034b4ac
There was already a constant for this
...
also update copyright
2017-10-10 11:47:10 +01:00
David Baker
a9f9d68631
More optimisation
2017-10-10 11:38:31 +01:00
David Baker
707374d5dc
What year is it!? Who's the president!?
2017-10-10 11:21:41 +01:00
David Baker
89fa00ddff
Merge branch 'develop' into dbkr/channel_notifications
2017-10-10 11:20:17 +01:00
Richard van der Hoff
6a6cc27aee
fed server: process PDUs for different rooms in parallel
...
With luck, this will give a real-time improvement when there are many rooms and
the server ends up calling out to fetch missing events.
2017-10-09 18:30:31 +01:00
Richard van der Hoff
4c7c4d4061
Fed server: use a linearizer for ongoing transactions
...
We don't want to process the same transaction multiple times concurrently, so
use a linearizer.
2017-10-09 18:30:10 +01:00
Richard van der Hoff
ba5b9b80a5
fed server: refactor on_incoming_transaction
...
Move as much as possible to after the have_responded check, and reduce the
number of times we iterate over the pdu list.
2017-10-09 18:10:53 +01:00
Richard van der Hoff
a6e3222fe5
Fed server: Move origin-check code to _handle_received_pdu
...
The response-building code expects there to be an entry in the `results` list
for each entry in the pdu_list, so the early `continue` was messing this
up. That doesn't really matter, because all that the federation client does is
log any errors, but it's pretty poor form.
2017-10-09 17:53:32 +01:00
Richard van der Hoff
0eeaa25694
Merge pull request #2508 from matrix-org/rav/federation_queue_logcontexts
...
Fix up logcontext handling in (federation) TransactionQueue
2017-10-09 17:43:48 +01:00
Richard van der Hoff
aa3fac8057
Merge pull request #2507 from matrix-org/rav/execute_concurrently_log_contexts
...
Fix logcontext handling for concurrently_execute
2017-10-09 17:43:32 +01:00
Erik Johnston
e8496efe84
Fix up comment
2017-10-09 15:17:34 +01:00
Richard van der Hoff
01bbacf3c4
Fix up logcontext handling in (federation) TransactionQueue
...
Avoid using preserve_context_over_function, which has problems with respect to
logcontexts.
2017-10-06 22:39:25 +01:00
Richard van der Hoff
148428ce76
Fix logcontext handling for concurrently_execute
...
Avoid preserve_context_over_deferred, which is broken.
2017-10-06 22:24:28 +01:00
Richard van der Hoff
c8f568ddf9
Fix up deferred handling in federation.py
...
* Avoid preserve_context_over_deferred, which is broken
* set consumeErrors=True on defer.gatherResults, to avoid spurious "unhandled
failure" erros
2017-10-06 22:14:24 +01:00
Richard van der Hoff
3ddda939d3
some comments in the state res code
2017-10-05 14:58:17 +01:00
David Baker
f878e6f8af
Spam checking: add the invitee to user_may_invite
2017-10-05 14:02:28 +01:00
David Baker
269af961e9
Make be faster
2017-10-05 13:27:12 +01:00
David Baker
ed80c6b6cc
Add fastpath optimisation
2017-10-05 13:20:22 +01:00
David Baker
e433393c4f
pep8
2017-10-05 13:08:02 +01:00
David Baker
985ce80375
They're called rooms
2017-10-05 13:03:44 +01:00
David Baker
b9b9714fd5
Get rule type right
2017-10-05 13:02:19 +01:00
David Baker
fa969cfdde
Support for channel notifications
...
Add condition type to check the sender's power level and add a base
rule using it for @channel notifications.
2017-10-05 12:39:18 +01:00
David Baker
0c8da8b519
Use better method for word boundary searching
...
From ebc95667b8
2017-10-05 11:57:43 +01:00
David Baker
cbe3c3fdd4
pep8
2017-10-05 11:43:10 +01:00
David Baker
6748f0a579
Fix notif kws that start/end with non-word chars
...
Only prepend / append word bounary characters if the search
expression starts or ends with a word character, otherwise they
don't work because there's no word bounary between whitespace and
a non-word char.
2017-10-05 11:33:30 +01:00
David Baker
d8ce68b09b
spam check room publishing
2017-10-04 14:29:33 +01:00
David Baker
78d4ced829
un-double indent
2017-10-04 12:44:27 +01:00
David Baker
197c14dbcf
Add room creation checks to spam checker
...
Lets the spam checker deny attempts to create rooms and add aliases
to them.
2017-10-04 10:47:54 +01:00
David Baker
1e2ac54351
s/roomid/room_id/
2017-10-03 17:41:38 +01:00
David Baker
1e375468de
pass room id too
2017-10-03 17:13:14 +01:00
David Baker
c2c188b699
Federation was passing strings anyway
...
so pass string everywhere
2017-10-03 15:46:19 +01:00
David Baker
c46a0d7eb4
this shouldn't be debug
2017-10-03 15:20:14 +01:00
David Baker
bd769a81e1
better logging
2017-10-03 15:16:40 +01:00
David Baker
537088e7dc
Actually write warpper function
2017-10-03 14:28:12 +01:00
David Baker
41fd9989a2
Skip spam check for admin users
2017-10-03 14:17:44 +01:00
Erik Johnston
11d62f43c9
Invalidate cache
2017-10-03 14:12:28 +01:00
Erik Johnston
e4ab96021e
Update comments
2017-10-03 14:10:41 +01:00
David Baker
2a7ed700d5
Fix param name & lint
2017-10-03 14:04:10 +01:00
David Baker
84716d267c
Allow spam checker to reject invites too
2017-10-03 13:56:43 +01:00
Erik Johnston
f2da6df568
Remove spurious line feed
2017-10-03 11:31:06 +01:00
Erik Johnston
30848c0fcd
Ignore incoming events for rooms that we have left
...
When synapse receives an event for a room its not in over federation, it
double checks with the remote server to see if it is in fact in the
room. This is done so that if the server has forgotten about the room
(usually as a result of the database being dropped) it can recover from
it.
However, in the presence of state resets in large rooms, this can cause
a lot of work for servers that have legitimately left. As a hacky
solution that supports both cases we drop incoming events for rooms that
we have explicitly left.
This means that we no longer support the case of servers having
forgotten that they've rejoined a room, but that is sufficiently rare
that we're not going to support it for now.
2017-10-03 11:18:21 +01:00
Erik Johnston
e585c83209
Merge branch 'master' of github.com:matrix-org/synapse into develop
2017-10-02 18:11:24 +01:00
Erik Johnston
6c1bb1601e
Bump version and changelog
2017-10-02 18:05:17 +01:00
Erik Johnston
ea87cb1ba5
Make 'affinity' package optional
2017-10-02 18:03:59 +01:00