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

LinksPreview::Ability to remove the attached link #2235

Closed
7 tasks done
RomaricMourgues opened this issue Jun 7, 2022 · 2 comments · Fixed by #2238
Closed
7 tasks done

LinksPreview::Ability to remove the attached link #2235

RomaricMourgues opened this issue Jun 7, 2022 · 2 comments · Fixed by #2238
Assignees
Labels
enhancement New feature or request qa:passed

Comments

@RomaricMourgues
Copy link
Contributor

RomaricMourgues commented Jun 7, 2022

Describe the solution you'd like
Right now links attachments are created next to messages that contains a link. Like on Slack, I would like to be able to remove the link using a small "x" button next to the attachment which appear on hovering the attachment.
Screenshot 2022-06-07 at 11 20 22

Additional context
In order to implement this we will:

  • Create and document the new DELETE /companies/{company_id}/threads/{thread_id}/messages/{message_id}/links/:url_with_encode_uri endpoint to document in Messages operations in https://www.notion.so/linagora/Rest-APIs-232eb8e51c3743ccbb7aa3534a5a7db9

  • This endpoint will call a service in src/services/messages/services/messages-operations.ts and will remove any link attachment to the message with the same url

  • Only the owner of the message can do this operation so a rule must be added to compare the context user to the message creator.

  • The update must be broadcasted via websockets (using this.threadMessagesService.onSaved(message, { created: false }, context);)

  • On frontend, we will add the api-client function in src/app/features/messages/api/message-api-client.ts

  • On frontend, we will add this operation to src/app/features/messages/hooks/use-message.ts as removeLink(url: string) accessible from the return of the hook

  • On frontend, we will add the "x" using feather icons as usual

@RomaricMourgues RomaricMourgues added the enhancement New feature or request label Jun 7, 2022
@RomaricMourgues
Copy link
Contributor Author

@rezk2ll please ping me if the issue needs more details, we do not start the work until it is perfectly clear for everyone.

@rezk2ll rezk2ll linked a pull request Jun 7, 2022 that will close this issue
8 tasks
RomaricMourgues added a commit to rezk2ll/Twake that referenced this issue Jun 9, 2022
@hantt12
Copy link

hantt12 commented Jun 16, 2022

Passed on staging

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request qa:passed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants