You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`[avatarReupload] expiry renew for ${ed25519Str(conversation.id)}of file ${fileId} failed but our last reupload was less than 12 days ago, so we don't want to retry`
208
+
`[avatarReupload] ${ed25519Str(conversation.id)} last reupload was recent enough, so we don't want to reupload it`
153
209
);
154
210
// considering this to be a success
155
211
returnRunJobResult.Success;
156
212
}
157
-
// renew failed, but our last reupload was more than 12 days ago, so we want to reprocess and
158
-
// reupload our current avatar, see below
213
+
// renew failed, and our last reupload was not too recent, so we want to reprocess and
214
+
// reupload our current avatar, see below...
159
215
}
160
216
161
217
// here,
162
218
// - either the format or the size is wrong
163
219
// - or we do not have a ourProfileLastUpdatedSeconds yet
164
-
// - or the expiry renew failed and our last reupload was more than 12 days ago
220
+
// - or the expiry renew failed and our last reupload not recent
165
221
// In all those cases, we want to reprocess our current avatar, and reupload it.
166
222
167
-
window.log.info(`[profileupdate] about to auto scale avatar for convo ${conversation.id}`);
223
+
window.log.info(
224
+
`[avatarReupload] about to auto scale avatar for convo ${ed25519Str(conversation.id)}`
225
+
);
168
226
169
227
conversation=ConvoHub.use().getOrThrow(convoId);
170
228
171
229
// Reprocess the avatar content, and reupload it
172
230
// This will pick the correct file server depending on the env variables set.
173
-
awaituploadAndSetOurAvatarShared({
231
+
constdetails=awaituploadAndSetOurAvatarShared({
174
232
decryptedAvatarData,
175
233
ourConvo: conversation,
176
234
context: 'reuploadAvatar',
177
235
});
236
+
window.log.info(
237
+
`[avatarReupload] reupload done for ${ed25519Str(conversation.id)}: ${details?.avatarPointer}`
238
+
);
239
+
returnRunJobResult.Success;
178
240
}catch(e){
179
-
window.log.warn(`[profileReupload] failed with ${e.message}`);
241
+
window.log.warn(`[avatarReupload] failed with ${e.message}`);
0 commit comments