зеркало из https://github.com/nextcloud/spreed.git
Merge pull request #3757 from nextcloud/techdebt/noid/dont-ping-while-waiting-for-chat-messages
Don't ping the session while waiting for chat messages
This commit is contained in:
Коммит
d3cbdb605c
|
@ -30,6 +30,7 @@ use OCA\Talk\Chat\ChatManager;
|
|||
use OCA\Talk\Chat\MessageParser;
|
||||
use OCA\Talk\GuestManager;
|
||||
use OCA\Talk\Model\Message;
|
||||
use OCA\Talk\Participant;
|
||||
use OCA\Talk\Room;
|
||||
use OCA\Talk\TalkSession;
|
||||
use OCP\AppFramework\Http;
|
||||
|
@ -246,7 +247,14 @@ class ChatController extends AEnvironmentAwareController {
|
|||
$timeout = min(30, $timeout);
|
||||
|
||||
if ($this->participant->getSessionId() !== '0') {
|
||||
$this->room->ping($this->participant->getUser(), $this->participant->getSessionId(), $this->timeFactory->getTime());
|
||||
// The mobile apps dont do internal signaling unless in a call
|
||||
$isMobileApp = $this->request->isUserAgent([
|
||||
IRequest::USER_AGENT_TALK_ANDROID,
|
||||
IRequest::USER_AGENT_TALK_IOS,
|
||||
]);
|
||||
if ($isMobileApp && $this->participant->getInCallFlags() === Participant::FLAG_DISCONNECTED) {
|
||||
$this->room->ping($this->participant->getUser(), $this->participant->getSessionId(), $this->timeFactory->getTime());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Загрузка…
Ссылка в новой задаче