AccelerateNetworks / fusionpbx-webtexting

GNU Affero General Public License v3.0
0 stars 0 forks source link

Update ThreadPreview's last_message upon receiving new message #32

Closed dunkeltron closed 5 months ago

dunkeltron commented 6 months ago

Currently the user has to hard reload the page to see a change in the ThreadPreview component's last_message

dunkeltron commented 6 months ago

Planned fix involves updating the threadPreviews Array to a threadPreviews Map<string,Object> and all knock on effects of this change.

Plan also involves passing new messages from main.ts to WebTextingContainer using events. May have to change WebTextingContainers props to computed props.

dunkeltron commented 5 months ago

seem to have a fix for getting the body preview updated. the timestamp is still jacked but I can solve that friday

dunkeltron commented 5 months ago

Timestamp and bodypreview get updated.

dunkeltron commented 5 months ago

we appear to have an issue where the newMessages field in ThreadPreview is not properly determining which messages are for which instance. probably need to get the logic in order for group mms vs single contact mms

dunkeltron commented 5 months ago

This behavior has been fixed. It looks like each ThreadPreview component still checks to see if each message from global.ts's addMessage function could be a space for optimization in the future.