Major security issue! Set file sharing rights on SEND instead of during the composition of message
When composing a message/draft, before the message is actually sent, the file attached or selected file from within onedrive for business is shared with the user. Even if you cancel the message you're writing (which is not that clear on how to do since you need to expand the chat window to find the trashcan), the share is still active. Even if you actually delete the files from the files meny in the client, the file is still shared! Lets say that you selected a confidential file by mistake - that gets shared - you need to take many steps to get that undone (either delete the file from the folder ms teams create in your onedrive or change/remove the share manually - if you actually find the file again. The better solution should be to set and execute the share on SEND rather than while composing the message/draft. Also a view, "shared BY me" should be easy to find as a user to cleanup all files you might have shared both on intention and by mistake.