File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ export const actions = {
8181 if ( bskyPostPrefix !== undefined ) profile . bskyPostPrefix = bskyPostPrefix ;
8282 if ( bskyPostSuffix !== undefined ) profile . bskyPostSuffix = bskyPostSuffix ;
8383
84- // Handle avatar upload
84+ // Handle avatar upload (cache-bust with timestamp so federated instances re-fetch)
8585 const avatar = formData . get ( 'avatar' ) as File | null ;
8686 if ( avatar && avatar . size > 0 ) {
8787 const result = await processUpload ( avatar , 'avatar' ) ;
@@ -110,6 +110,15 @@ export const actions = {
110110 }
111111 profile . fields = fields ;
112112
113+ // Refresh cache busters on image URLs so federated instances re-fetch them
114+ const cacheBust = `v=${ Date . now ( ) } ` ;
115+ if ( profile . avatarUrl ) {
116+ profile . avatarUrl = profile . avatarUrl . replace ( / \? v = \d + $ / , '' ) + `?${ cacheBust } ` ;
117+ }
118+ if ( profile . headerUrl ) {
119+ profile . headerUrl = profile . headerUrl . replace ( / \? v = \d + $ / , '' ) + `?${ cacheBust } ` ;
120+ }
121+
113122 await saveBotProfile ( profile ) ;
114123
115124 try {
You can’t perform that action at this time.
0 commit comments