brandly / Lax

IRC client built with Electron & React
https://github.com/brandly/Lax
MIT License
137 stars 26 forks source link

Nickname change not reflected in UI #96

Closed MitchTalmadge closed 3 years ago

MitchTalmadge commented 4 years ago

If I join freenode with one nickname, then change it, the old nickname stays present in the chat area and when showing my name after sending messages.

For example, here I change my nick from "mitch" to "Makani":

image

Notice the inconsistencies.

brandly commented 4 years ago

each message in a convo carries a from value. either the data model would need to change to separate identity from nicknames, messages would have to be mapped over whenever a nickname changes to update the from, or we leave that first Makani as-is since that was the nickname at the time of the message. i'm fine with leaving it.

updating the list of people is a good idea tho. the list is updated for some actions:

https://github.com/brandly/Lax/blob/b66850a8de4799d827d62fd0ee6af96c35341d46/src/js/reducers/conversations.js#L143-L150

but not for RECEIVE_NICK:

https://github.com/brandly/Lax/blob/b66850a8de4799d827d62fd0ee6af96c35341d46/src/js/reducers/conversations.js#L222