# Old user avatars in quoted text?

**URL:** https://meta.discourse.org/t/old-user-avatars-in-quoted-text/95798
**Category:** Bug
**Tags:** fixed
**Created:** [8월 28, 2018, 2:16오전 UTC](https://meta.discourse.org/t/old-user-avatars-in-quoted-text/95798 "2018-08-28T02:16:46Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![gdpelican](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gdpelican/32/81308_2.png) [@gdpelican](https://meta.discourse.org/u/gdpelican)
#### Post date: [8월 28, 2018, 2:16오전 UTC](https://meta.discourse.org/t/old-user-avatars-in-quoted-text/95798/1 "2018-08-28T02:16:46Z")

</div>

I’m not sure if this is _quite_ a bug, or just some behaviour that I don’t quite get, but it appears that quoting someone in a post stores their avatar at that point in time with the quote. Like here:

 ![37%20PM](https://global.discourse-cdn.com/meta/original/3X/6/0/60b9b3bd3d45f93798b6767b4c1f70e721369360.png)

It seems like this might be a regression of this thing:  
[https://meta.discourse.org/t/after-changing-avatar-quotes-still-show-the-old-avatar/21122](https://meta.discourse.org/t/after-changing-avatar-quotes-still-show-the-old-avatar/21122)

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [8월 28, 2018, 4:14오전 UTC](https://meta.discourse.org/t/old-user-avatars-in-quoted-text/95798/2 "2018-08-28T04:14:18Z")

</div>

Not a bug; it’s always been that way.

---

<div class="post-metadata">

### Author: ![gdpelican](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gdpelican/32/81308_2.png) [@gdpelican](https://meta.discourse.org/u/gdpelican)
#### Post date: [8월 28, 2018, 5:05오후 UTC](https://meta.discourse.org/t/old-user-avatars-in-quoted-text/95798/4 "2018-08-28T17:05:48Z")

</div>

I suppose its because the posts are baked with the URL at the time. Do you want a fix for this, or is it too potentially resource intensive to trigger a rebake each time someone changes their avatar?

---

<div class="post-metadata">

### Author: ![gerhard](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gerhard/32/119479_2.png) [@gerhard](https://meta.discourse.org/u/gerhard)
#### Post date: [8월 28, 2018, 5:33오후 UTC](https://meta.discourse.org/t/old-user-avatars-in-quoted-text/95798/5 "2018-08-28T17:33:39Z")

</div>

[Changing the avatar already triggers a rebake](https://github.com/discourse/discourse/blob/15f657309a9b457ff315482da2fe8fbbed9caa02/app/models/user.rb#L944-L945) of posts containing quotes, but it’s currently quite resource intensive to find and rebake all posts. So, it’s possible that some of them won’t be updated. Post revisions aren’t updated at all.

I have plans to fix all of this when I’m working on improvements for user renaming/anonymizing in one of the next releases. It will require a new table that keeps track of all the places where a user is quoted, mentioned, oneboxed, and what not.

If you want to work on this, please keep in mind that rebaking just to update the avatar isn’t needed. I’d suggest reusing [code from `UpdatUsername`](https://github.com/discourse/discourse/blob/15f657309a9b457ff315482da2fe8fbbed9caa02/app/jobs/regular/update_username.rb#L149-L165). It’s a lot faster.

---

<div class="post-metadata">

### Author: ![dsims](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dsims/32/485916_2.png) [@dsims](https://meta.discourse.org/u/dsims)
#### Post date: [4월 25, 2024, 4:46오후 UTC](https://meta.discourse.org/t/old-user-avatars-in-quoted-text/95798/6 "2024-04-25T16:46:49Z")

</div>

> [@gerhard](#):
>
> [아바타를 변경하면 이미 다시 생성(rebake)이 트리거됩니다](https://github.com/discourse/discourse/blob/15f657309a9b457ff315482da2fe8fbbed9caa02/app/models/user.rb#L944-L945) 인용문을 포함하는 게시글의

이것은 `after_save`에서 발생하지만 `will_save_change`를 사용하므로 실제로는 절대 트리거되지 않는다고 확신합니다. 이전에는 작동했던 것 같지만, [2017년의 이 커밋](https://github.com/discourse/discourse/commit/77d4c4d8dc00491b99aa15dfd78eb22a47ffe663#diff-9802ca3c9c4cf89904fd44bc114e35ebdf2c5dd3d5b645491e2b253e1afef29bR822)에서 (아마도 실수로) `_changed`에서 `will_save_change`로 변경되었습니다.

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [4월 25, 2024, 4:50오후 UTC](https://meta.discourse.org/t/old-user-avatars-in-quoted-text/95798/7 "2024-04-25T16:50:14Z")

</div>

이것에 관해서도 #Contribute > Bug 토픽이 몇 개 있는 것 같습니다:

> [@\`\[quote\]\`s use incorrect user avatar after changing avatar](https://meta.discourse.org/t/quote-s-use-incorrect-user-avatar-after-changing-avatar/286750):
>
> The issue is [https://discuss.kde.org/t/how-come-im-seeing-old-avatars-in-quotes/7492?u=rokejulianlockhart](https://discuss.kde.org/t/how-come-im-seeing-old-avatars-in-quotes/7492?u=rokejulianlockhart) to see I’m reporting this here per [https://discuss.kde.org/t/how-come-im-seeing-old-avatars-in-quotes/7492/9?u=rokejulianlockhart](https://discuss.kde.org/t/how-come-im-seeing-old-avatars-in-quotes/7492/9?u=rokejulianlockhart)

> [@Profile image changing bug](https://meta.discourse.org/t/profile-image-changing-bug/217184):
>
> if someone quote me, and I change my profile image after that, my profile image is not changed in the post that quoted me [AyProductions: Image changed ChirsWard: quoted](https://community.appinventor.mit.edu/t/ai-starter-5554-emulator-white-screen-only/50290/4?u=qwe_rfv) from [MIT App Inventor Community](https://community.appinventor.mit.edu/)

---

<div class="post-metadata">

### Author: ![gerhard](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gerhard/32/119479_2.png) [@gerhard](https://meta.discourse.org/u/gerhard)
#### Post date: [5월 26, 2024, 8:49오후 UTC](https://meta.discourse.org/t/old-user-avatars-in-quoted-text/95798/11 "2024-05-26T20:49:59Z")

</div>

@dsims 님, 이 문제의 근본 원인을 찾아주셔서 감사합니다! 수정 사항을 담은 PR을 생성했습니다.

> <https://github.com/discourse/discourse/pull/27184>

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [6월 1, 2024, 7:00오전 UTC](https://meta.discourse.org/t/old-user-avatars-in-quoted-text/95798/12 "2024-06-01T07:00:22Z")

</div>

이 주제는 4일 후 자동으로 닫혔습니다. 더 이상 새로운 답변을 작성할 수 없습니다.
