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

fix: Move setting avatar logic before checking for hook usage #8351

Conversation

MissAllSunday
Copy link
Contributor

Currently there is a check on Profie-View when trying to build u the text for the alert:

		// Did a mod already take care of this one?
		if (!empty($alerts[$id_alert]['text']))
			continue;

The check is assuming that someone using the integrate_fetch_alerts already build their own text key which is OK, however, the check also prevents setting the 'sender' key with the profile data from the sender_id already loaded previously.

This forces whoever uses the integrate_fetch_alerts hook to load their own sender_id profile data which means adding extra queries for data that is already available.

This PR simply moves the code for populating 'sender' key before the check to 'text'

@Sesquipedalian Sesquipedalian merged commit 6952673 into SimpleMachines:release-2.1 Dec 4, 2024
8 checks passed
@MissAllSunday MissAllSunday deleted the allow-showing-avatars-from-hooks branch December 4, 2024 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants