Commit Graph

98 Commits

Author SHA1 Message Date
Logan Allen
f8320b3de1 chat-hook: fix synced map getting out of sync with outgoing subscriptions 2020-07-30 14:20:40 -07:00
Liam Fitzgerald
f381b53e06 chat-hook: identify DMs correctly 2020-07-28 17:04:41 +10:00
Liam Fitzgerald
66e665d683 chat-hook: rerun fix on OTA 2020-07-28 12:16:48 +10:00
Liam Fitzgerald
ccf9296bab chat-hook: correctly poke chat-view on fix case and fix path 2020-07-28 12:14:27 +10:00
Logan Allen
49dc81f7d1 chat-hook: append messages to new dm 2020-07-24 15:50:21 -07:00
Logan Allen
1578103128 chat-hook: cleaned up and fixed app paths 2020-07-24 14:38:34 -07:00
Logan Allen
d737cb28ae chat-hook: recreate all foreign dms as local dms 2020-07-24 13:59:15 -07:00
Liam Fitzgerald
64065d720c groups: refactor ota 2020-07-13 01:44:49 +00:00
Liam Fitzgerald
c139332a55 various: cleanup unnecessary sigpams 2020-07-08 11:37:15 +10:00
Liam Fitzgerald
bd2fbc2f9c groups: address review comments 2020-07-02 12:20:23 +10:00
Liam Fitzgerald
47352a06ba groups: finalize state adapters 2020-06-24 10:28:57 +10:00
Liam Fitzgerald
8cf81002ec Merge branch 'ford-fusion' into lf/groups-refactor 2020-06-23 12:13:03 +10:00
Philip Monk
6ff9f75bb7
Merge remote-tracking branch 'origin/master' into ford-fusion 2020-06-19 14:52:18 -07:00
Matilde Park
a65edb52cd Merge branch 'master' into feat/spa 2020-06-17 17:12:13 -04:00
Isaac Visintainer
f0d36f6a52 chat-hook: pull on store path when removing 2020-06-15 16:01:46 -06:00
Liam Fitzgerald
9123cabed7 chat: fix remaining issues with new groups 2020-06-15 18:07:21 +10:00
Philip Monk
3c5541432a
chat-hook: upgrade state to stop storing cards
The card type has changed, so we need a state upgrade.  As I understand
it, these existed for a particular upgrade to get around the fact that
Ford Turbo updates apps in random order.  In Ford Fusion, all apps are
started in parallel before any of their moves are emitted, so this is
no longer a problem.

Since these will no longer be needed and they don't load properly when
+card changes, we deleted them.  While trying to find a bug that I
introduced, I refactored +on-load a little bit -- I can revert this if
it's confusing.
2020-06-12 21:17:10 -07:00
Liam Fitzgerald
d66dbff61e groups: migrate to push-pull hooks and resources 2020-06-08 17:53:16 +10:00
Liam Fitzgerald
f392e861ee groups: add prototype state adapters and cleanup 2020-06-03 12:21:00 +10:00
Liam Fitzgerald
e2aa8af220 groups: add .hidden flag on group 2020-06-02 15:24:08 +10:00
Liam Fitzgerald
51d2c32170 chat: revive groupify 2020-06-02 15:24:05 +10:00
Liam Fitzgerald
841ba72bd9 chat: update to new groups 2020-06-02 15:20:14 +10:00
Logan Allen
71d0b1a6c0 apps: individual apps send their %serve-dir poke 2020-06-01 14:02:13 -04:00
Liam Fitzgerald
d7a5499b9a chat: expose types with libs 2020-04-30 09:04:29 +10:00
Liam Fitzgerald
531efa82a9 chat: address review comments 2020-04-29 18:45:07 +10:00
Liam Fitzgerald
5f4fc28bc9 chat: improve namespacing of chat-* types
Improved the namespacing by dropping the app prefix on types, e.g.
chat-hook-action -> action. Compensated for shadowing by importing the
/sur files behind a face. End result is that a chat-hook-action becomes
an action:hook. Splits chat-json into lib/chat-{hook,store,view}. Uses
^? on changes files in /lib and /sur to discourage deeply nested
importing.
2020-04-28 12:01:13 +10:00
Liam Fitzgerald
ec03c29b72 chat-hook: fix variable name 2020-04-23 23:12:30 +10:00
Liam Fitzgerald
a978ca2b5a chat: autoleave on watch-ack 2020-04-21 07:50:27 +10:00
Liam Fitzgerald
e21f9d772a chat: leave chats associated with group on group leave
When a group is left, the permissions no longer exist and the mailbox
subscription is kicked. Before attempting to resubscribe, we simply
check if we still have permissions and if not, leave the chat.
2020-04-21 07:47:48 +10:00
Fang
9f42d420b3
chat-hook: remove incorrect comment
We do, in fact, use it. Implicitly, when reestablishing the subscription during
kick handling.
2020-04-18 13:13:08 +02:00
Fang
4c4858f198
chat-hook: clarify backlog wire handling logic 2020-04-16 01:44:36 +02:00
Fang
0f05ed3149
chat-hook: consistently pull backlog subs
We weren't accounting for backlog subscriptions with non-zero message
indexes in their wires. Now, we look through all of our outgoing
subscriptions to identify relevant backlog subscriptions, and leave all
of those.

The more proper fix here is to not include message indexes in the wire
in the first place, since we don't ever reuse that anywhere. But that's
a more invasive change, so we just leave a TODO for it instead.
2020-04-15 19:26:58 +02:00
Fang
084ce356a8
chat-hook: on %remove, try our best to pull subs
Previously, we were removing the relevant entry from the `synced` map
before calling `+pull-wire`, which requires an entry to still be there.
This lead to subscriptions not actually being pulled, commonly leading
to "subscribe wire not unique" errors on re-join.

In addition to fixing that, `%remove` actions now try to pull the
subscription regardless of whether they have an entry in the `synced`
map or not. `%leave` is always safe, and we might want to clean up
subscriptions that shouldn't be there anymore in the first place.
2020-04-15 16:29:26 +02:00
Logan Allen
b85697cbec chat-hook: respect backlog index, no longer truncate 2020-04-10 15:25:58 -04:00
Logan Allen
8cdfb559f6 chat-view and hook: style pass and backlog truncation 2020-04-10 15:25:58 -04:00
Logan Allen
ecc8942eaf chat: reversed order that messages are stored in for faster performance 2020-04-10 15:25:58 -04:00
Logan Allen
717b02ad6f chat: added jet hints 2020-04-02 17:43:03 -04:00
Fang
1e1c26e306
chat-hook: clean up pre-OS1 subscriptions
If chats with identical resource paths were created, that would result
in chat-hook seeing updates twice.

These "/mailbox wire sub to local chat-store" subscriptions aren't
created by the current logic anymore, and as such any existing ones
should be eradicated.
2020-03-20 17:56:17 +01:00
Fang
a162ab0e73
chat-hook: handle watch-nack for /store wires too
Similar to /backlog wires, we want to emulate %remove behavior on-nack.
2020-03-19 15:32:40 +01:00
Fang
62dfc5fd3c
chat-hook: clear all subscriptions on watch-nack
We would remove the entry from state, but not clean up its mailbox subscription.
2020-03-15 17:37:57 +01:00
Logan Allen
a0a39b87dc chat-hook: watch-ack successfully for store subscripttion kills 2020-03-11 23:13:31 -07:00
Isaac Visintainer
ba43f03726 chat-hook: resubscribe when kicked from chat-store 2020-03-11 22:21:56 -07:00
Logan Allen
84a9f23af6 chat-hook: fix ota chat backlog duplication 2020-03-11 20:43:41 -07:00
Logan Allen
cac98b2284 chat-hook: don't send invites upon on-load 2020-03-11 20:33:38 -07:00
Logan Allen
64a62df461 chat-hook: removed comments 2020-03-11 16:45:03 -07:00
Logan Allen
51eebf3407 chat-hook: send updates to synced every time the object changes 2020-03-11 16:45:01 -07:00
Logan Allen
64938e24e9 chat-hook: added ability to subscribe to chat-hook state from the frontend 2020-03-11 16:44:15 -07:00
Logan Allen
10e0dca58c chat-hook: ota fix and improvement on backlog fetching 2020-03-11 12:12:51 -07:00
Logan Allen
17bea9a5bd chat: only send invites for unmanaged chats 2020-03-09 16:44:16 -07:00
Logan Allen
e8c95157d4 chat-hook: emit cards upon upgrade AND store cards to be sent later upon chat-store trigger to support either order of updating 2020-03-09 12:40:04 -07:00