mirror of https://github.com/zulip/zulip.git
608c787c52
When the email mirror gateway is sending messages "as" a user (as triggered by having access to the missed-message email address), attachments were still created as the Email Gateway bot. Since the sender (the end-user) was not the owner of those attachments (the gateway bot), nor were they referenced yet anywhere, this resulted in the attachments being "orphaned" and not allowed to be accessed by anyone -- despite the attachment links being embedded in the message. This was accompanied by the error: ``` WARN [] User 12345 tried to share upload 123/3LkSA4OcoG6OpAknS2I0SFAQ/example.jpf in message 123456, but lacks permission INFO [zerver.lib.email_mirror] Successfully processed email from user 12345 to example-stream ``` We solve this by creating attachment objects as the users the message will be sent from. |
||
---|---|---|
.. | ||
actions | ||
data_import | ||
integration_fixtures/nagios | ||
lib | ||
management | ||
migrations | ||
openapi | ||
tests | ||
tornado | ||
views | ||
webhooks | ||
worker | ||
__init__.py | ||
apps.py | ||
context_processors.py | ||
decorator.py | ||
filters.py | ||
forms.py | ||
logging_handlers.py | ||
middleware.py | ||
models.py | ||
signals.py |