1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-28 09:42:41 +01:00
phorge-phorge/src/applications/notification
epriestley ab2aa74d6e Fix several duplication/replay behaviors in Aphlict
Summary:
Ref T12566. Ref T12563. This fixes three bugs with Aphlict replay stuff:

First, Conphernece would try to repaint the UI even if no thread was open. Only repaint when a thread is open.

Second, although we deduplicate JX.Leader messages, we didn't deduplicate actual notification messages. If you browsed the leader window, then it re-elected itelf as a leader and replayed history, it could rebroadcast notifications and other windows could show doubles. Deduplicate notifications to prevent this.

Third, we always replayed the last 60 seconds of history. When you browsed the leader window, whichever window became the new leader (possibly the one you just browsed) could replay messages from before it had opened, leading to duplicate messages. Particularly, after receiving a message and then browsing you could see that message again. Instead, only replay history as far back as when the window first opened.

Test Plan:
  - Clicked "Repaint" with a thread open, saw a repaint. Clicked "Repaint" with Conpherence open but no thread, no repaint and no 404 request to `/update/null/`.
  - In browser A, opened three windows. In browser B, sent a notification. In browser A, browsed the leader window away twice in a row. Observed that the window which never became a leader doesn't duplicate notifications.
  - In browser A, opened three windows. In browser B, sent a notification. In browser A, browsed the leader window away over and over again. Observed that replay requests issued with appropriate history windows.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T12566, T12563

Differential Revision: https://secure.phabricator.com/D17722
2017-04-18 12:10:12 -07:00
..
application Complete modernization of Aphlict configuration 2016-04-14 04:57:00 -07:00
builder Strip timestamps from popup notification bubbles 2016-07-08 07:46:09 -07:00
client Deduplicate application-level notifications from Aphlict 2017-04-17 15:55:38 -07:00
config Complete modernization of Aphlict configuration 2016-04-14 04:57:00 -07:00
controller Fix several duplication/replay behaviors in Aphlict 2017-04-18 12:10:12 -07:00
engineextension Fully modularize DestructionEngine 2015-12-21 17:03:44 -08:00
feed Desktop Notification support 2015-06-22 13:11:37 -07:00
garbagecollector Provide bin/garbage for interacting with garbage collection 2015-10-02 09:17:24 -07:00
query Convert all calls to 'IconFont' to just 'Icon' 2016-01-27 20:59:27 -08:00
setup Complete modernization of Aphlict configuration 2016-04-14 04:57:00 -07:00
storage Cache user notification and message counts 2016-06-05 08:52:43 -07:00
view Add an icon to aphlict connection status 2016-10-02 08:17:21 -07:00