Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

room/channel history lost #76

Open
AlexeyGusev opened this issue Aug 17, 2018 · 12 comments
Open

room/channel history lost #76

AlexeyGusev opened this issue Aug 17, 2018 · 12 comments
Assignees
Labels

Comments

@AlexeyGusev
Copy link

It is possible to write to a subscribed channel and see responses while the window is open. Closing the channel (chat) window and reopening it again will end up in lost history — this is obviously not as desired, contents should be automatically filled in when the room is open (either full history or some period/size, perhaps adjustable in settings). The same happens after pidgin restart - room history is lost.

@jaroslawp
Copy link
Collaborator

This should be fixed in upcoming V4 API version (https://github.com/EionRobb/purple-mattermost/tree/v4api_try1 - still needs some bugs to be fixed before release..)

@EionRobb
Copy link
Owner

Have you also tried adding the chat to your buddy list and marking it as "persistent" and/or "auto-join"?

@AlexeyGusev
Copy link
Author

yes, chats are marked as persistent and auto-join, but this doesn't help. Closing the window kills chat history, reopening that chat results in empty window.

@jaroslawp
Copy link
Collaborator

Please retry with v4api_try1 branch again and let me know if that is fixed now ?

@jaroslawp jaroslawp self-assigned this Sep 15, 2018
@AlexeyGusev
Copy link
Author

no, this is not fixed at least in 0e126dd
history is still often not displayed on startup and is always not displayed after chat has been closed/reopen

@AlexeyGusev
Copy link
Author

might be useful: I see this in logs (pidgin --debug):

(12:21:31) mattermost: Fetching url https://<HOST_NAME>/api/v4/channels/zubx5o6ek7g9zgrjqffyhmahco
(12:21:31) util: requesting to fetch a URL
(12:21:31) dnsquery: Performing DNS lookup for <HOST_NAME>
(12:21:31) g_log: purple_conversation_get_chat_data: assertion 'conv != NULL' failed
(12:21:31) g_log: serv_got_joined_chat: assertion 'name != NULL' failed
(12:21:31) g_log: purple_conversation_get_chat_data: assertion 'conv != NULL' failed
(12:21:31) g_log: purple_conversation_set_data: assertion 'conv != NULL' failed
<previous line repeated 5 times>
(12:21:31) g_log: purple_conversation_present: assertion 'conv != NULL' failed

@jaroslawp jaroslawp added the bug label Sep 19, 2018
@jaroslawp
Copy link
Collaborator

OK, I've made some cleanup in that part of code, can you try this branch ? :

https://github.com/EionRobb/purple-mattermost/tree/cleanup-1

(please move away ~/.purple/blist.xml again before trying)

This branch seems to work for me: for auto-joined channels I get the history automatically, for other: I get it when I open a channel: that is read once - still only 60 first posts since last time client viewed, then it should be saved in pidgin logs.

@AlexeyGusev
Copy link
Author

AlexeyGusev commented Oct 12, 2018

tried version b9bcf62

open any public or private room - and you get a virgin white empty window for that channel :(
I don't understand why this happens but sometimes – after a relatively long period of pidgin being down – the channels come open full of recent history, but only immediately after pidgin startup. If the room window is closed and open again, it's empty. Could this actually be some setting on the server side…

another annoyance is that if someone writes to a channel, that channel's chat window will pop up with the written message (but no previous history) – this, IMHO, should not happen, but the message sent to the channel by someone should be displayed when the user opens that channel window. Closing this window and opening it later will render a white empty chat window again.

@jaroslawp
Copy link
Collaborator

Thanks for testing !

History:

Yes on initial startup without a ~/.purple/blist.xml the plugin assumes that all channels have been read 'now' so there is no history to fetch.

On subsequent startups plugin reads last time channel was viewed from blist.xml and fetches (only 60) messages on the channel starting at that time.

If you close the conversation window and open it again within same pidgin session it should show all conversations in that window.

If you exit pidgin and open it again the conversation window will be empty (if no new messages appeared on channel in mean time) but you can access past messages via Conversation -> View Log menu. .. this is how it seems to work for me now ?

The window popping up when somebody writes to the channel: Yes, I guess this could be implemented differently than it is now (also we seem to have additional bug somewhere in there: if a chat is marked as non-persistent and window is closed it will not reopen on new messages as expected but for some reason when reopened manually history which is read from server is not displayed in it ...).

@AlexeyGusev
Copy link
Author

On subsequent startups plugin reads last time channel was viewed from blist.xml and fetches (only 60) messages on the channel starting at that time.

Yes, it seems to be so.

If you close the conversation window and open it again within same pidgin session it should show all conversations in that window.

Not for rooms/channels, those are reopened empty, no conversations at all.

If you exit pidgin and open it again the conversation window will be empty (if no new messages appeared on channel in mean time) but you can access past messages via Conversation -> View Log menu. .. this is how it seems to work for me now ?

Correct, but I can only access history for buddy conversations; for rooms, neither channel name, channel ID nor team ID fits search criteria for «Buddies → View User Log…» menu. Even more interesting, by right-clicking on a room and selecting «View Log» from appearing menu, I only see some history until Aug 16, and for channels that were created later, there is no history. Is this because some newer plugin versions stopped writing history for rooms?

@AlexeyGusev
Copy link
Author

any chance this isuue will be fixed at some point?
021d199 still does not retrieve history from server.

@JacenBoy
Copy link

Still seems to be an issue; messages sent since the last time the client was online seem to be pulled in, but the rest of the channel history is not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants