Closed rudy-tao closed 1 year ago
When backend automatically registers a user, it will generate a welcome message.
Fixed in https://github.com/tinode/webapp/commit/48405bcb945dcd5d6123671b8f62353c19ab9508. Please verify.
This did not fix the issue, historical messages still do not appear when opening the page.
Please attach a client-side log. Thanks.
@or-else
See the line in the log "ver": "0.22.6"
? That means you are not using the fix. Please test the fix I provided.
@or-else sorry, this is the log compiled and run using the next branch, and there are still no previous messages.
This should fix it: https://github.com/tinode/webapp/commit/5d56c1712846b3609e087bc6e06eb7fd91e763fc Thanks.
@rudy-tao Have you had a chance to test the fix?
@or-else I tried to run it, but there was no display of the chat history data.
I also found a problem that when using automatic login redirect links on mobile with different resolutions, it does not follow the login process. I tried to debug the code and found that the SidepanelView in tinode-web.jsx was not rendering, which caused automatic login to fail.
@rudy-tao Have you had a chance to test the fix?
I added the following judgment in version 0.22.6, which solved my problem.
if (this.state.isReader && !prevState.isReader){
// If reader status has changed and data became available.
// topic.getMeta(topic.startMetaQuery().withLaterData(MESSAGES_PAGE).build());
this.subscribe(topic);
}
I also found a problem that when using automatic login redirect links on mobile with different resolutions, it does not follow the login process. I tried to debug the code and found that the SidepanelView in tinode-web.jsx was not rendering, which caused automatic login to fail.
I'm confused. Are you describing a different problem?
@rudy-tao Have you had a chance to test the fix?
I added the following judgment in version 0.22.6, which solved my problem.
if (this.state.isReader && !prevState.isReader){ // If reader status has changed and data became available. // topic.getMeta(topic.startMetaQuery().withLaterData(MESSAGES_PAGE).build()); this.subscribe(topic); }
Where did you add it? If you added it here https://github.com/tinode/webapp/blob/next/src/views/messages-view.jsx#L268 then it will have unintended side effects.
I think I understand now why it's not working for you. You are trying to automatically subscribe user to a new P2P topic, one that he has not been subscribed to before. That's actually a feature. Let me make it optional.
I added this feature:
https://github.com/tinode/webapp/commit/08bdc7bc08b54984b4acaf8aa981bab63667f2fe
Change https://github.com/tinode/webapp/blob/08bdc7bc08b54984b4acaf8aa981bab63667f2fe/src/config.js#L128 to true
and recompile. It should work.
Still no history messages displayed...
I added this feature: 08bdc7b Change
https://github.com/tinode/webapp/blob/08bdc7bc08b54984b4acaf8aa981bab63667f2fe/src/config.js#L128
to
true
and recompile. It should work.
Describe the bug When directly logging in and jumping to the user chat interface, the historical chat data will not be pulled.
To Reproduce Steps to reproduce the behavior:
Expected behavior Display historical chat data.