@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Play a sound when receiving a new chat message

Summary:
Ref T7567. Nothing fancy yet, just getting this working. Sound is lightly edited version of "Pop 6":

https://www.freesound.org/people/greenvwbeetle/sounds/244656/

Test Plan: Sent chat, heard sounds.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T7567

Differential Revision: https://secure.phabricator.com/D17721

+31 -14
+16 -14
resources/celerity/map.php
··· 10 10 'conpherence.pkg.css' => 'a34d59bd', 11 11 'conpherence.pkg.js' => '5f86c17d', 12 12 'core.pkg.css' => '959330a2', 13 - 'core.pkg.js' => 'e129dcd4', 13 + 'core.pkg.js' => '5363ae35', 14 14 'darkconsole.pkg.js' => '1f9a31bc', 15 15 'differential.pkg.css' => '90b30783', 16 16 'differential.pkg.js' => 'ddfeb49b', ··· 19 19 'favicon.ico' => '30672e08', 20 20 'maniphest.pkg.css' => '4845691a', 21 21 'maniphest.pkg.js' => '5ab2753f', 22 + 'rsrc/audio/basic/tap.mp3' => 'fc2fd796', 22 23 'rsrc/css/aphront/aphront-bars.css' => '231ac33c', 23 24 'rsrc/css/aphront/dark-console.css' => '53798a6d', 24 25 'rsrc/css/aphront/dialog-view.css' => '685c7e2d', ··· 370 371 'rsrc/js/application/calendar/behavior-event-all-day.js' => 'b41537c9', 371 372 'rsrc/js/application/calendar/behavior-month-view.js' => 'fe33e256', 372 373 'rsrc/js/application/config/behavior-reorder-fields.js' => 'b6993408', 373 - 'rsrc/js/application/conpherence/ConpherenceThreadManager.js' => 'dd84a70f', 374 + 'rsrc/js/application/conpherence/ConpherenceThreadManager.js' => '311eae46', 374 375 'rsrc/js/application/conpherence/behavior-conpherence-search.js' => '9bbf3762', 375 376 'rsrc/js/application/conpherence/behavior-durable-column.js' => 'aa3bd034', 376 377 'rsrc/js/application/conpherence/behavior-menu.js' => '80dda04a', ··· 560 561 'conpherence-message-pane-css' => '14199428', 561 562 'conpherence-notification-css' => 'cef0a3fc', 562 563 'conpherence-participant-pane-css' => '26a3ce56', 563 - 'conpherence-thread-manager' => 'dd84a70f', 564 + 'conpherence-thread-manager' => '311eae46', 564 565 'conpherence-transaction-css' => '85129c68', 565 566 'd3' => 'a11a5ff2', 566 567 'differential-changeset-view-css' => '41af6d25', ··· 1132 1133 '2ee659ce' => array( 1133 1134 'javelin-install', 1134 1135 ), 1136 + '311eae46' => array( 1137 + 'javelin-dom', 1138 + 'javelin-util', 1139 + 'javelin-stratcom', 1140 + 'javelin-install', 1141 + 'javelin-aphlict', 1142 + 'javelin-workflow', 1143 + 'javelin-router', 1144 + 'javelin-behavior-device', 1145 + 'javelin-vector', 1146 + ), 1135 1147 '31420f77' => array( 1136 1148 'javelin-behavior', 1137 1149 ), ··· 2095 2107 'javelin-util', 2096 2108 'phabricator-shaped-request', 2097 2109 ), 2098 - 'dd84a70f' => array( 2099 - 'javelin-dom', 2100 - 'javelin-util', 2101 - 'javelin-stratcom', 2102 - 'javelin-install', 2103 - 'javelin-aphlict', 2104 - 'javelin-workflow', 2105 - 'javelin-router', 2106 - 'javelin-behavior-device', 2107 - 'javelin-vector', 2108 - ), 2109 2110 'de2e896f' => array( 2110 2111 'javelin-behavior', 2111 2112 'javelin-dom', ··· 2376 2377 'javelin-behavior-toggle-class', 2377 2378 'javelin-behavior-lightbox-attachments', 2378 2379 'phabricator-busy', 2380 + 'javelin-sound', 2379 2381 'javelin-aphlict', 2380 2382 'phabricator-notification', 2381 2383 'javelin-behavior-aphlict-listen',
+1
resources/celerity/packages.php
··· 46 46 'javelin-behavior-toggle-class', 47 47 'javelin-behavior-lightbox-attachments', 48 48 'phabricator-busy', 49 + 'javelin-sound', 49 50 'javelin-aphlict', 50 51 'phabricator-notification', 51 52 'javelin-behavior-aphlict-listen',
+6
src/applications/conpherence/controller/ConpherenceUpdateController.php
··· 546 546 $dropdown_query = id(new AphlictDropdownDataQuery()) 547 547 ->setViewer($user); 548 548 $dropdown_query->execute(); 549 + 550 + $receive_sound = celerity_get_resource_uri('/rsrc/audio/basic/tap.mp3'); 551 + 549 552 $content = array( 550 553 'non_update' => $non_update, 551 554 'transactions' => hsprintf('%s', $rendered_transactions), ··· 558 561 'aphlictDropdownData' => array( 559 562 $dropdown_query->getNotificationData(), 560 563 $dropdown_query->getConpherenceData(), 564 + ), 565 + 'sound' => array( 566 + 'receive' => $receive_sound, 561 567 ), 562 568 ); 563 569
webroot/rsrc/audio/basic/tap.mp3

This is a binary file and will not be displayed.

+8
webroot/rsrc/js/application/conpherence/ConpherenceThreadManager.js
··· 313 313 314 314 this._updating.knownID = r.latest_transaction_id; 315 315 this._latestTransactionID = r.latest_transaction_id; 316 + 317 + JX.Leader.broadcast( 318 + 'conpherence.message.' + r.latest_transaction_id, 319 + { 320 + type: 'sound', 321 + data: r.sound.receive 322 + }); 323 + 316 324 JX.Stratcom.invoke( 317 325 'conpherence-redraw-aphlict', 318 326 null,