Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If there are no sessions, we don't need to run a query #4190

Merged
merged 1 commit into from Sep 21, 2020

Conversation

nickvergessen
Copy link
Member

Should remove all those queries from our query log:

SELECT * FROM `oc_talk_guests` WHERE `session_hash` IN (NULL)

Called from

$guestSessions = [];
foreach ($participants['guests'] as $participant) {
$guestSessions[] = sha1($participant['sessionId']);
}
$guestNames = $this->guestManager->getNamesBySessionHashes($guestSessions);

Signed-off-by: Joas Schilling <coding@schilljs.com>
@nickvergessen nickvergessen added 3. to review feature: api 🛠️ OCS API for conversations, chats and participants technical debt labels Sep 21, 2020
@nickvergessen nickvergessen added this to the 💚 Next Major (21) milestone Sep 21, 2020
Copy link
Member

@rullzer rullzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch

@nickvergessen nickvergessen merged commit 8786e1d into master Sep 21, 2020
@nickvergessen nickvergessen deleted the feature/noid/no-guests-no-query branch September 21, 2020 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review feature: api 🛠️ OCS API for conversations, chats and participants technical debt
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants