@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.

Fix Exception in Chat room when you are not a Participant

Summary:
After this change you can lurk in public chats, and receive notifications, without crashing your planet.

Fix exception "Undefined index: PHID-USER-..." shown to newcomers when they are receiving messages
from a public Chat they are not members of.

Closes T15497

Test Plan:
- Have the Notification server (Aphlict) enabled and running.
https://we.phorge.it/book/phorge/article/notifications/
- Be user Alice and visit a Conpherence Room. Alice must be not a participant.
- Be user Bob and send a message in that Room.

Now Alice does not see a crash anymore, but the message from Bob.

Reviewers: O1 Blessed Committers, speck

Reviewed By: O1 Blessed Committers, speck

Subscribers: speck, tobiaswiese, Matthew, Cigaryno

Maniphest Tasks: T15497

Differential Revision: https://we.phorge.it/D25408

+7 -2
+7 -2
src/applications/conpherence/controller/ConpherenceUpdateController.php
··· 328 328 ->executeOne(); 329 329 330 330 $non_update = false; 331 - $participant = $conpherence->getParticipant($user->getPHID()); 331 + 332 + // The User is always available. The Participant may not. See: 333 + // User: it's you, lurking the Chat (maybe it's a public chat). 334 + // Participant: it's you, if you are a Chat Member. 335 + // https://we.phorge.it/T15497 336 + $participant = $conpherence->getParticipantIfExists($user->getPHID()); 332 337 333 338 if ($need_transactions && $conpherence->getTransactions()) { 334 339 $data = ConpherenceTransactionRenderer::renderTransactions( ··· 336 341 $conpherence); 337 342 $key = PhabricatorConpherenceColumnMinimizeSetting::SETTINGKEY; 338 343 $minimized = $user->getUserSetting($key); 339 - if (!$minimized) { 344 + if (!$minimized && $participant) { 340 345 $participant->markUpToDate($conpherence); 341 346 } 342 347 } else if ($need_transactions) {