David Baker
ccffb0965d
Remove stale line
2016-05-20 17:59:10 +01:00
David Baker
18d68bfee4
Handle empty events table
2016-05-20 17:58:09 +01:00
David Baker
d4503e25ed
Make deleting push actions more efficient
...
There's no index on received_ts, so manually binary search using the stream_ordering index, and only update it once an hour.
2016-05-20 17:56:10 +01:00
David Baker
149fa411e2
Only delete push actions after 30 days
2016-05-20 15:25:12 +01:00
Erik Johnston
e00e8f2166
Merge pull request #769 from matrix-org/erikj/push_actions_delete
...
Delete old pushers
2016-05-13 14:41:36 +01:00
David Baker
80be396464
Correct SQL statement for postgres
...
In standard sql, join binds tighter than comma, so we were joining on the wrong table. Postgres follows the standard (apparently).
2016-05-04 13:19:59 +01:00
Erik Johnston
183f23f10d
Delete old pushers
2016-05-03 14:22:33 +01:00
David Baker
35b7b8e4bc
Remove unused function
2016-04-29 20:10:34 +01:00
David Baker
b0a1036d93
Use explicit join
2016-04-29 19:28:56 +01:00
David Baker
8f99cd5996
Oops, actually specify the user id
2016-04-29 19:27:03 +01:00
David Baker
60f44c098d
Remove unnecessary if
2016-04-29 19:17:10 +01:00
David Baker
50ad8005e4
Put spaces at start of line
2016-04-29 19:16:15 +01:00
David Baker
f63bd4ff47
Send a rather basic email notif
...
Also pep8 fixes
2016-04-20 13:02:01 +01:00
David Baker
07d765209d
First bits of emailpusher
...
Mostly logic of when to send an email
2016-04-19 14:24:36 +01:00
Erik Johnston
a2546b9082
Fix query for get_unread_push_actions_for_user_in_range
2016-04-14 11:08:31 +01:00
David Baker
767fc0b739
pep8
2016-04-13 14:23:27 +01:00
David Baker
54d08c8868
Only return unread notifications
...
Make get_unread_push_actions_for_user_in_range only return unread event actions, being more true to its name. Done in two separate sql queries to get actions after a read receipt and those in a room wiht no receipt at all. SQL queries by Erik.
2016-04-13 14:16:45 +01:00
David Baker
3fb35cbd6f
Oops, inequality fail
2016-04-07 17:33:37 +01:00
David Baker
0fd1cd2400
pep8
2016-04-06 16:50:47 +01:00
David Baker
7e2c89a37f
Make pushers use the event_push_actions table instead of listening on an event stream & running the rules again. Sytest passes, but remaining to do:
...
* Make badges work again
* Remove old, unused code
2016-04-06 15:42:15 +01:00
Mark Haines
2a37467fa1
Use google style doc strings.
...
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-01 16:12:07 +01:00
Erik Johnston
6cf0ba1466
Bump get_unread_event_push_actions_by_room_for_user cache
2016-03-22 14:18:21 +00:00
Mark Haines
b9977ea667
Remove dead code for setting device specific rules.
...
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-18 16:05:13 +00:00
Erik Johnston
0214745239
Rename functions
2016-02-10 11:09:56 +00:00
Erik Johnston
7b0d846407
Atomically persit push actions when we persist the event
2016-02-09 16:19:15 +00:00
Erik Johnston
4d36e73230
Actually return something sensible
2016-02-03 16:35:00 +00:00
Erik Johnston
aa4af94c69
We return dicts now.
2016-02-03 16:29:32 +00:00
Erik Johnston
771528ab13
Change event_push_actions_rm_tokens schema
2016-02-03 10:50:49 +00:00
David Baker
10f76dc5da
Make LRU cache not default to treecache & add options to use it
2016-01-22 12:10:33 +00:00
David Baker
42eae4634f
Use new invalidate_many cache invalidation to invalidate the event_push_actions cache appropriately.
2016-01-22 11:22:48 +00:00
Erik Johnston
8f66fe6392
Cache get_unread_event_push_actions_by_room_for_user
2016-01-21 15:02:07 +00:00
Erik Johnston
3adcc4c86a
Return highlight_count in /sync
2016-01-19 11:35:50 +00:00
Mark Haines
a8e9e0b916
Remove the PushersTable and EventPushActionsTable objects
2016-01-12 14:41:26 +00:00
David Baker
992928304f
Delete notifications for redacted events
2016-01-06 11:58:46 +00:00
David Baker
c79f221192
Add is_guest flag to users db to track whether a user is a guest user or not. Use this so we can run _filter_events_for_client when calculating event_push_actions.
2016-01-06 11:38:09 +00:00
David Baker
4eb7b950c8
= not == in sql
2016-01-04 18:11:17 +00:00
David Baker
c914d67cda
Rename event-actions to event_push_actions as per PR request
2016-01-04 14:05:37 +00:00