nextcloud / spreed

🗨️ Nextcloud Talk – chat, video & audio calls for Nextcloud
https://nextcloud.com/talk
GNU Affero General Public License v3.0
1.6k stars 428 forks source link

Allow Bots to post files #10715

Open bigcat88 opened 11 months ago

bigcat88 commented 11 months ago

Is your feature request related to a problem? Please describe. This is a feature request.

Describe the solution you'd like A simple function for sending a file, similar to regular Talk API.

Describe alternatives you've considered This can be implemented using AppAPI - but I would still like to have a normal function of sending a message containing a file only using BotAPI, and not impersonate the user and send the file from him.

Additional context Will be useful to receive commands to generate images/videos, and post results in chat, like in Midjourney.

nickvergessen commented 11 months ago

There are currently 2 technical problems and some logic "problems":

  1. Talk does not handle the file upload at the moment
  2. Talk does not handle the sharing at the moment

In both cases default server endpoints are used on which bots can not authenticate. For the sharing one we can easily add a simple wrapper, but for webdav it's rather complicated and it actually hints to some logic "problems"

  1. Where should the items be stored?
    • In the files of any user given by the bot?
    • In the files of any moderator/owner?
    • In the files of the user that enabled the bot? (What if it was occ?)
  2. If it's a user:
    • What happens if the user left the room, got disabled or deleted, or has no quota anymore?
    • Can the bot access the user's files (e.g. to read a recording and then create a transcript, etc). If so the scope of the bot should be limited, or can it just access all webdav files of the user?
  3. If not owned by a user: users can use bots to violate their quota limitations, the files would not be editable, etc.