You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Additional context
In order to implement this we will:
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
The text was updated successfully, but these errors were encountered:
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.
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-232eb8e51c3743ccbb7aa3534a5a7db9This 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 urlOnly 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 hookOn frontend, we will add the "x" using feather icons as usual
The text was updated successfully, but these errors were encountered: