Skip to content

Conversation

@oobjectt
Copy link
Contributor

@oobjectt oobjectt commented Dec 8, 2022

It has its functions:

  • If the user himself sends the message, the report does not appear (it is obvious that he will not report himself)

  • We have also added a functionality, in which when you click on the nickname or avatar, the user profile opens

  • Finally, the reported message will be updated according to which history line you report

imagen


const reportMessage = (message: any) =>
{
setMessengerHistory([]); // We do this because we are interested in displaying only the reported message.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Doesn't this reset all of the messenger history?

{
setMessengerHistory([]); // We do this because we are interested in displaying only the reported message.
report(ReportType.IM, { reportedUserId: message.webId });
addMessengerEntry({ id: message.id, webId: message.webId, entityId: message.entityId, name: message.name, timestamp: message.timestamp, type: ChatEntryType.TYPE_IM, roomId: message.roomId, message: message.message });
Copy link
Collaborator

Choose a reason for hiding this comment

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

why are we adding this room chat entry to messenger history ?

return { addChatEntry, chatHistory, roomHistory, messengerHistory };

return { addChatEntry, chatHistory, roomHistory, messengerHistory, setMessengerHistory, addMessengerEntry };
Copy link
Collaborator

Choose a reason for hiding this comment

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

do we need to export the settter for the messenger history? Is there a scenario where we would want to completely reset it?

@s074
Copy link
Collaborator

s074 commented Dec 13, 2022

Came back to offer some insight. I think you have the right idea but the wrong execution. Instead of clearing the messenger history to use it to store the reported message, append the reported message to the report selected chats and then set the current step to be selectCfhTopic

@oobjectt
Copy link
Contributor Author

Changes done! Thank you very much for the information. 👍 

@oobjectt oobjectt requested a review from s074 January 18, 2023 20:29
@duckietm
Copy link
Contributor

duckietm commented May 3, 2023

Thanks, works perfectly

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.

3 participants