Skip to content

Fix/wtel 9955/chats with postsetion - #1471

Open
plnnsimon wants to merge 2 commits into
mainfrom
fix/WTEL-9955/chats-with-postsetion
Open

Fix/wtel 9955/chats with postsetion#1471
plnnsimon wants to merge 2 commits into
mainfrom
fix/WTEL-9955/chats-with-postsetion

Conversation

@plnnsimon

Copy link
Copy Markdown
Contributor

No description provided.

const contactId = chat.contact.id;
const targetChatId = chat.id;

LOAD_CLOSED_CHAT_HISTORY: async (context, { chat, contactId }) => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

питання тут в тому, як поведінка взагалі випадає на цю гілку логіки, якщо немає контакту?...
і, походу, в тому місці, де ця логіка викликається невірно, якраз і не вистачає релоаду історії
ти знайшов місце, де цей екшен помилково викликається?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@liza-pohranichna так, ти права, кондішин if (!contactId) був недосяжний, так як в the-chat-history вже йшла перевірка на наявність contact?.id
відповідаючи на друге питання - то скоріше не знайшов, реальне місце де бракувало ресету історії для чатів без контакту це OPEN_CHAT в chat.js

root: true,
});
} else {
if (!chat.contact?.id) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

оце дуже логічно, як на мене

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@liza-pohranichna так, бо з цим була пов'язана ще одна бага, бо якщо немає контакту в чаті, то мало би підвантажуватись тільки останні смс з клієнтом, а при переході з закритого вже чату на активний - в активному чомусь відображалось декілька смс з історії (хоча не мало би)

OPEN_CHAT: async (context, chat) => {
const isUnidentifiedClosedChat = !chat.contact?.id && chat.closedAt;
const isUnidentifiedClosedChat =
!chat.contact?.id && chat.closedAt && !chat.allowReporting;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

точняк
можливо ще варто виправити геттер IS_CHAT_ON_WORKSPACE_CLOSED враховуючи це?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@liza-pohranichna чесно, не скажу чи варто, так як покривав тільки ті моменти, які проходили з Аньой на зізвоні, бо всіх всіх нюансів по чатам нажаль не шарю (
але якщо ти кажеш, що варто, то можу спробувати

resolveDefaultTab() {
const { processing, clientInfo, generalInfo } = this.tabsObject;

if (this.showProcessing && this.taskOnWorkspace?.closedAt) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

є геттер IS_CHAT_ON_WORKSPACE_CLOSED якраз от

`features/chat/closed/LOAD_CLOSED_CHAT_HISTORY`,
chat.value,
);
const resetHistory = () => store.dispatch(`${namespace}/RESET_CHAT_HISTORY`);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

але чому тоді тут прибрався ресет хісторі?

getTopMessageEl();
});

onUnmounted(() => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

блін... ну от тут логіка починає виглядати заплутано)))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants