Sync DM chat name/icon on user changes

Add a signal to keep direct-message chat name and icon in sync when a user updates their username or avatar, and register it in AppConfig.ready. Also initialize a DM chat's name/icon on creation from the other member's username/avatar if those fields are missing, saving only the changed fields.
This commit is contained in:
2026-06-05 23:49:48 +02:00
parent c0af4c2349
commit 6422fefe46
3 changed files with 51 additions and 1 deletions

View File

@@ -6,3 +6,6 @@ class ChatConfig(AppConfig):
name = 'social.chat'
label = "chat"
def ready(self):
import social.chat.signals # noqa: F401