fix(webhook): global webhook stops sending after restart until Account Settings re-saved
Problem
The global webhook stops sending after every process restart. It only starts working again after re-saving Account Settings in the UI, and breaks again on the next restart.
Cause
loadGroupApps() (libs/user.js) runs the load extensions before it populates s.group[ke].init. loadWebhookForUser reads s.group[ke].init.global_webhook_url while init is still empty, so allowedSend[ke] is set to false on every cold start and sendMessage bails out with "Invalid Settings". Saving Account Settings re-runs loadGroupApps with a now-populated init, which is why a UI re-save temporarily "fixes" it.
Regression from 267a2787 ("Updates to internal Notification Handling"), which introduced the allowedSend gate. The previous code had no gate and read the URL at send time.
Repro (A/B verified on a live install)
- Configure a global webhook, restart the process, trigger an event → no POST, "Invalid Settings" logged.
- Save Account Settings in the UI → works again.
- Restart → broken again (the UI fix does not persist).
- With this patch: works on cold start, no UI save needed.
Fix
Read the URL from the userDetails already passed into the extender, falling back to init for safety.