300 Commits

Author SHA1 Message Date
Ian Gulliver
6c51f14723 Hogfather message round trip. 2016-01-08 15:39:13 -08:00
Ian Gulliver
3a4614f977 Correct function naming, actually get a test passing. 2016-01-08 15:27:34 -08:00
Ian Gulliver
c9cb04d420 Make Shutdown() do something. 2016-01-08 15:22:47 -08:00
Ian Gulliver
918243b296 Make hogfather.PublicChat.Start() private. 2016-01-08 15:15:56 -08:00
Ian Gulliver
c744a2cde6 Type annotations for EventTarget imports. 2016-01-07 21:09:38 -08:00
Ian Gulliver
87b4e4257a Drop the www 2016-01-07 21:02:00 -08:00
Ian Gulliver
7dcae7e88f Remove duplicate function. 2016-01-07 20:55:25 -08:00
Ian Gulliver
c9626a7616 Add isConnected() 2016-01-07 20:51:46 -08:00
Ian Gulliver
5eb3674833 Batch saving to localStorage on initial subscribe; makes a big difference when we have lots of messages. 2016-01-05 22:47:31 -08:00
Ian Gulliver
5280b710d2 Shortcut calling onMessage for everything in cache. 2016-01-05 20:44:28 -08:00
Ian Gulliver
77227df9aa Don't re-write the message cache while we're processing it. 2016-01-05 19:12:57 -08:00
Ian Gulliver
59fab5e3c6 localStorage cache for subject messages. 2016-01-05 18:51:27 -08:00
Ian Gulliver
49f14e54cf Stop some pathological datastore behavior when a client is fetching many messages. 2016-01-05 18:12:59 -08:00
Ian Gulliver
6ee8dc4f05 Switch to a PRNG implementation that doesn't have a birthday problem. 2015-12-30 22:01:25 -08:00
Ian Gulliver
8cfa55c722 Add requestAccess(), denyRequest(), addOwner(), and addWriter(). Also add request, request_denied and acl_change events. 2015-12-29 19:11:56 -08:00
Ian Gulliver
fb85596501 Better error description. Add a TODO to fix pin() error handling. 2015-12-29 15:14:14 -08:00
Ian Gulliver
3b3755f7f5 Add amOwner() and amWriter(). Reject sendMessage() if we lack write access. 2015-12-29 12:00:35 -08:00
Ian Gulliver
415c6ad1fd Lint fixes. 2015-12-29 11:48:33 -08:00
Ian Gulliver
976a5bd49f Factor out ACL code. Keep a manifest copy of hogfather messages. 2015-12-29 11:42:54 -08:00
Ian Gulliver
78b92347a7 Start enforcing writer restrictions. 2015-12-29 10:43:47 -08:00
Ian Gulliver
9aa04cfbca Hogfather now emits message events. 2015-12-27 21:40:00 -08:00
Ian Gulliver
17d7c470fd Lint cleanups. 2015-12-27 21:21:23 -08:00
Ian Gulliver
076238eb99 Include cosmo metadata in returned messages. 2015-12-27 21:19:33 -08:00
Ian Gulliver
fdd1b85539 Allow uuid() to be called statically. 2015-12-27 21:08:36 -08:00
Ian Gulliver
53840a0cdd Add getMessages() and sendMessage() 2015-12-27 20:48:50 -08:00
Ian Gulliver
199dd020ba Add getID() 2015-12-27 20:06:27 -08:00
Ian Gulliver
1acbeaee12 Delay hogfather promise resolution until subscription syncs up. 2015-12-27 17:12:12 -08:00
Ian Gulliver
6789c42703 Rip out hogfather's early complexity and move toward implementing the public chat first. 2015-12-27 17:04:46 -08:00
Ian Gulliver
3f37741ae7 Avoid log spam on invalid instance channels. 2015-12-27 16:43:19 -08:00
Ian Gulliver
7be8b4e9b6 Add Hogfather.Create() factory. 2015-12-25 14:23:04 -08:00
Ian Gulliver
30a3e89bfc Fix several cases of assuming that a Profile always has a numeric ID, rather than a named key, which is untrue. 2015-12-24 15:26:43 -08:00
Ian Gulliver
b90d3d7b44 More hogfather structure. 2015-12-24 15:12:25 -08:00
Ian Gulliver
6e879ce1d5 Add hogfather basic structure. 2015-12-24 15:00:26 -08:00
Ian Gulliver
8b6f5c916d First Hogfather test. 2015-10-17 16:04:37 +02:00
Ian Gulliver
69aa0e711a Start of hogfather code. 2015-10-17 15:55:43 +02:00
Ian Gulliver
cec8a6c9d3 Fix the remaining lint errors. 2015-10-16 16:23:29 +02:00
Ian Gulliver
f77007e047 Fix some lint errors from previous commit. 2015-10-15 21:55:55 +02:00
Ian Gulliver
a59f7f97f3 Add support for "local" subjects, which don't get pushed to the serve and get destroyed on unsubscribe. 2015-10-15 19:05:39 +02:00
Ian Gulliver
9b5a55b737 Add two event listener tests, mostly as examples. 2015-10-14 17:04:01 +02:00
Ian Gulliver
be831f40d3 Fix the thread locking model to be harder to screw up. 2015-07-06 04:12:33 +00:00
Ian Gulliver
d52d5df148 Add a sanity assertion. 2015-07-06 01:43:56 +00:00
Ian Gulliver
34154d3939 Remove duplicate line. 2015-07-06 01:21:04 +00:00
Ian Gulliver
ecdfce7970 Hide some additional includes. 2015-07-06 01:20:16 +00:00
Ian Gulliver
0e5723b9d0 Checkpoint: add helgrind target, switch to timespec_get(), add cosmo_random() 2015-07-06 01:11:40 +00:00
Ian Gulliver
9e8891884b Add cosmo_get_profile(), test_subscribe_acl 2015-07-05 02:59:07 +00:00
Ian Gulliver
afc201f69c Actually verify message ordering in test_message_ordering 2015-07-04 21:32:08 +00:00
Ian Gulliver
fdc74ed53c Add test_message_ordering. Make all functions static so we know if any aren't in use. 2015-07-03 22:17:06 +00:00
Ian Gulliver
bd103b15bf Fix result of send_message() when chaos monkey intervenes post-request. 2015-07-03 22:16:42 +00:00
Ian Gulliver
a416119ea3 Add subscribe_barrier test 2015-07-02 19:51:06 +00:00
Ian Gulliver
6585fb3445 Add another promise test. 2015-07-02 04:37:23 +00:00