Commit Graph

96 Commits (d36943c4df841e789ef85c206c7fc7c4665ba4bd)

Author SHA1 Message Date
David Baker 04f8478aaa Add the master push rule for the break-my-push button. Allow server default rules to be disabled by default. 2015-03-10 17:26:25 +00:00
David Baker c06b45129c Add more server default rules so we have default rules for whether you get notifs for invites / random member events 2015-03-06 11:50:51 +00:00
David Baker 657a0d2568 Comment typo 2015-03-06 11:34:30 +00:00
David Baker 6fab7bd2c1 s/user_name/user/ as per mjark's comment 2015-03-02 18:17:19 +00:00
David Baker cfac3b7873 SYN-267 Add a fallback rule as an explicit server default rule and make the default dont-notify so you effectively have a "notify for everything else" switch you can turn on and off. 2015-02-26 18:58:14 +00:00
David Baker 94fa334b01 Add enable/disable overlay for push rules (REST API not yet hooked up) 2015-02-25 19:17:07 +00:00
David Baker 8d5cce62ab Update pushers by app id and pushkey, not user id and pushkey 2015-02-13 16:16:16 +00:00
Erik Johnston 4ebbaf0d43 Blunty replace json with simplejson 2015-02-11 14:23:10 +00:00
Mark Haines b085fac735 Code-style fixes 2015-02-10 16:30:48 +00:00
David Baker 8f616684a3 Need to use re.search if looking for matches not at the start of the string. Also comparisons with None should be 'is'. 2015-02-09 17:01:40 +00:00
Matthew Hodgson a578251b48 only do word-boundary patches on bodies for now 2015-02-09 16:44:47 +00:00
Matthew Hodgson ecb0f78063 glob *s should probably be non-greedy 2015-02-08 02:37:35 +00:00
Matthew Hodgson c2afc2ad90 oops 2015-02-08 00:37:03 +00:00
Matthew Hodgson 8be07e0db4 kill off fnmatch in favour of word-boundary based push alerts (untested) 2015-02-08 00:34:34 +00:00
David Baker 2df41aa138 Server default rules now of all kinds rather than all being at lowest prio. 2015-02-05 14:46:37 +00:00
David Baker dc7bb70f22 s/instance_handle/profile_tag/ 2015-02-03 16:51:07 +00:00
David Baker 9a71add1c0 Use set_tweak instead of set_sound 2015-02-03 16:06:31 +00:00
David Baker 0b354fcb84 Again, don't assume all member events have displayname. 2015-01-30 23:10:35 +00:00
David Baker fe10b882b7 Don't assume all member events have a display nme. 2015-01-30 23:06:39 +00:00
David Baker 4ffac34a64 Add glob asterisks when running rules.
Means that now you can't do exact matches even in override rules,
but I think we can live with that. Advantage is that you'll now
always get back what was put in to the API.
2015-01-30 15:03:56 +00:00
David Baker 322a047502 Add room member count condition and default rule to make a noise on rooms of only 2 people. 2015-01-30 14:46:45 +00:00
David Baker 0b16886397 Change 'from' in notification pokes to 'sender' to match client API v2. Send sender display names where they exist. 2015-01-29 18:51:22 +00:00
David Baker 1235f7f383 Add default push rules including setting a sound for messages mentioning your username / display name 2015-01-29 18:38:22 +00:00
Mark Haines acb68a39e0 Code style fixes. 2015-01-29 16:12:40 +00:00
David Baker 8b1dd9f57f Only send a badge-reset if the user actually has unread notifications. 2015-01-29 16:10:01 +00:00
David Baker 6fde707add doc style fix 2015-01-28 14:14:49 +00:00
David Baker 20c47383dc Oops, bad merge: needed to change the base class of the rest servlets too. 2015-01-28 14:10:46 +00:00
David Baker 03149ad23a More code style things 2015-01-28 14:01:24 +00:00
David Baker e1ca0f1396 Brackets rather than slashes at end 2015-01-28 13:58:32 +00:00
David Baker 6df6f5e084 Redundant bracketing & missed space 2015-01-28 13:56:35 +00:00
David Baker ca7240a2f0 Update copyright 2015-01-28 13:17:55 +00:00
David Baker 273b12729b Reset badge count to zero when last active time is bumped 2015-01-28 11:55:49 +00:00
David Baker b481889117 Support membership events and more camelcase/underscores 2015-01-26 17:27:28 +00:00
David Baker efac71d6ca Pushers should only try & look for rejected devices in something that's a list or tuple. 2015-01-26 14:37:14 +00:00
David Baker f21f9fa3c5 Use push settings! 2015-01-23 17:07:06 +00:00
David Baker fc7a05c443 more pep8 suggestions 2015-01-23 13:36:01 +00:00
David Baker afb714f7be add instance_handles to pushers so we have a way to refer to them even if the push token changes. 2015-01-20 11:49:48 +00:00
David Baker 2ca2dbc821 Send room name and first alias in notification poke. 2015-01-15 16:56:18 +00:00
David Baker e3e2fc3255 Don't make the pushers' event streams cause people to appear online 2015-01-15 16:17:21 +00:00
David Baker 2cb30767fa Honour the 'rejected' return from push gateways
Add a timestamp to push tokens so we know the last time they we
got them from the device. Send it to the push gateways so it can
determine whether its failure is more recent than the token.
Stop and remove pushers that have been rejected.
2015-01-13 19:48:37 +00:00
David Baker 70d0a453f3 Split out function to decide whether to notify or a given event 2015-01-13 13:14:41 +00:00
David Baker fead431c18 If we didn't get any events, advance the token or we'll just keep not getting the same events again. 2014-12-18 18:44:33 +00:00
David Baker 9728c305a3 after a few rethinks, a working implementation of pushers. 2014-12-18 14:49:22 +00:00
David Baker 88af58d41d Update to app_id / app_instance_id (partially) and mangle to be PEP8 compliant. 2014-12-03 13:37:02 +00:00
David Baker eb6aedf92c More work on pushers. Attempt to do HTTP pokes. Not sure if the actual HTTP pokes work or not yet but the retry semantics are pretty good. 2014-11-21 12:21:00 +00:00
David Baker 74c3879760 Start creating a module to do generic notifications (just prints them to stdout currently!) 2014-11-19 18:20:59 +00:00