Commit Graph

11 Commits (fa76e1014a0cc5e75f1aa7d84b800e7827779384)

Author SHA1 Message Date
Your Name fa76e1014a feat: store custom emoji on cloud storage when enabled
Custom emoji were always written locally and served via hardcoded /storage
URLs, so they never used S3 even on cloud instances.

- CustomEmoji: centralize URL + storage on the active disk (cloud when
  pixelfed.cloud_storage is enabled, else local public/ disk) via
  urlForPath/url/storageTarget/storeMedia/storeMediaFromFile/deleteMedia
- Route emoji writes/deletes and URL generation (scan, CustomEmojiService::all)
  through those helpers in ImportEmojis, CustomEmojiService::import and
  AdminController
- Add admin:EmojiMoveStorageLocalToCloud to migrate existing local emoji to
  cloud: copy, verify by size, delete local, bust caches
- Schedule it daily when cloud storage is enabled
4 weeks ago
Your Name f0e951dcce fix: stop caching raw Eloquent models to prevent incomplete-object 500s
Caching an Eloquent model in a Cache::remember closure could deserialize
into a __PHP_Incomplete_Class on read, throwing 'attempt to access a
property on an incomplete object' and returning a 500. This surfaced on
guest profile pages (ProfileController::buildProfile reading
$user->user->settings) and affected several other latent call sites.

Changes:
- ProfileController: cache a plain settings array instead of the
  UserSetting model; fall back to defaults when the settings row is missing
- StoryService::getById: fetch a live model instead of caching it
- InstanceService::getByDomain, CustomEmoji::scan: cache arrays
- Site/MobileController: cache Page data as an array via a shared
  ManagesCachedPages trait; update blade views to array access
- Add public-route smoke/regression tests covering the cache-read path
4 weeks ago
Daniel Supernault 53742fa699
Lint 9 months ago
Daniel Supernault 481314cd23
Update custom emoji, add config_cache support 3 years ago
Daniel Supernault bc29073ab1
Fix CustomEmoji, properly handle shortcode updates and delete old copy in case the extension changes 4 years ago
Shadowfacts 0a7f8fd142
Change static_path on custom emojis to static_url 5 years ago
Daniel Supernault 46d5f12590
Update custom emoji json-ld 5 years ago
Daniel Supernault efeaf427e1
Add CustomEmoji admin dashboard 5 years ago
Daniel Supernault b2016e6c21
Update note transformers, add custom emoji support 5 years ago
Daniel Supernault dc17c9fc27
Improve emoji import 5 years ago
Daniel Supernault ca79e26d3a
Add custom emoji 5 years ago