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

Allow to clear chat history #1243

Closed
Ngri88 opened this issue Oct 5, 2018 · 12 comments · Fixed by #5889 or #6047
Closed

Allow to clear chat history #1243

Ngri88 opened this issue Oct 5, 2018 · 12 comments · Fixed by #5889 or #6047
Assignees
Milestone

Comments

@Ngri88
Copy link

Ngri88 commented Oct 5, 2018

I often used chat and there were a lot of messages. Now as soon as I open a chat, the application starts opening all messages from the very first. Opening this message history can take 20-30 seconds, during which I cannot write anything to the chat or even close the tab in the browser. Is it possible to hide the history of the chat as it is made in Facebook messenger?

The chat is loaded newest to oldest as a temporary workaround in Talk 7.
The optimal solution is to start at the read marker as described in #1164
Which will be covered by #1788

Since emptying all chat might still be a useful feature, eg in webinaries before opening the lobby, I will keep this issue open. - @nickvergessen

@nickvergessen
Copy link
Member

We will change the loading order, whether or not a delete history is needed then, we can see later.

For more information see #1164 and #1214

@nickvergessen nickvergessen added this to the 💔 Backlog milestone Oct 8, 2018
@nickvergessen nickvergessen added enhancement feature: chat 💬 Chat and system messages labels Oct 8, 2018
@intrazik
Copy link

+1

@nickvergessen
Copy link
Member

nickvergessen commented Nov 21, 2018

The loading speed is down to milliseconds again since we merged #1271
We will change the loading order also before the next release, so it loads the newest messages first and loads older messages only when you scroll up.

I guess we don't need a workaround like an option to hide the history then?

@Ngri88
Copy link
Author

Ngri88 commented Nov 21, 2018

The loading speed is down to milliseconds again since we merged #1271
We will change the loading order also before the next release, so it loads the newest messages first and loads older messages only when you scroll up.

I guess we don't need a workaround like an option to hide the history then?

Yes, changing the loading order is a good alternative to hiding chat history.

@nickvergessen
Copy link
Member

The chat is now loaded newest to oldest as a temporary workaround.
The optimal solution is to start at the read marker as described in #1164
Which will be covered by #1788

Since emptying all chat might still be a useful feature, eg in webinaries before opening the lobby, I will keep this issue open and update the first post with this information.

@nickvergessen
Copy link
Member

nickvergessen commented Jul 7, 2021

Frontend todos after #5889

  • UI option in the "Danger zone"
  • Drop all messages in the store when parsing a clear_history systemmessage
  • Reset(recover) read marker in the UI when being used as offset for a chat request

@nickvergessen
Copy link
Member

Reopening for frontend

@nickvergessen nickvergessen reopened this Jul 7, 2021
@PVince81
Copy link
Member

@nickvergessen should we also add an occ command to make it possible to automate this ? might need to also provide a timestamp

@nickvergessen
Copy link
Member

I'm not a too big fan of an occ command, as administrators with console access are mostly not the moderators. It's a difference between deploying and terminating a room and moderating it.

@mahibi
Copy link

mahibi commented Jul 15, 2021

i have a group with multiple users. i send the delete request as user2 but i receive as an answer that user1 cleared the chat:

<?xml version="1.0"?>
<ocs>
    <meta>
        <status>ok</status>
        <statuscode>200</statuscode>
        <message>OK</message>
    </meta>
    <data>
        <id>181</id>
        <token>q2fysw5t</token>
        <actorType>users</actorType>
        <actorId>user1</actorId>
        <actorDisplayName>user1</actorDisplayName>
        <timestamp>1626352322</timestamp>
        <message>You cleared the history of the conversation</message>
        <messageParameters>
            <actor>
                <type>user</type>
                <id>user1</id>
                <name>user1</name>
            </actor>
        </messageParameters>
        <systemMessage>history_cleared</systemMessage>
        <messageType>system</messageType>
        <isReplyable></isReplyable>
        <referenceId></referenceId>
    </data>
</ocs>

i would expect either user2 as the actor (or a 403 Forbidden if he is no moderator)

@nickvergessen
Copy link
Member

And user "participant2" deletes chat history for room "room1" with 403
Then user "participant1" sees the following messages in room "room1" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters |
| room1 | users | participant2 | participant2-displayname | Message 2 | [] |
| room1 | users | participant1 | participant1-displayname | Message 1 | [] |
And user "participant1" deletes chat history for room "room1" with 200
Then user "participant1" sees the following messages in room "room1" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters |
Then user "participant1" sees the following system messages in room "room1" with 200 (v1)
| room | actorType | actorId | actorDisplayName | systemMessage |
| room1 | users | participant1 | participant1-displayname | history_cleared |
Then user "participant2" sees the following system messages in room "room1" with 200 (v1)
| room | actorType | actorId | actorDisplayName | systemMessage |
| room1 | users | participant1 | participant1-displayname | history_cleared |

We have an integration confirming exactly this. A non moderator gets a 403 and when a moderator does it both receive a message that says the moderator cleared it.

@mahibi
Copy link

mahibi commented Jul 15, 2021

ah it seems this is a bug in postman which i use to send requests. seems it doesn't update the auth field correctly after a change... after a restart everything works as expected..

@marcoambrosini marcoambrosini linked a pull request Jul 22, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants