~nova/fletcher#143: 
Server preference for cross-server previewing

For privacy and given consent issues, bot admins ought to be able to disable previewing posts from their server on another server.

Status
RESOLVED IMPLEMENTED
Submitter
~erin
Assigned to
Submitted
1 year, 5 months ago
Updated
1 year, 4 months ago
Labels
No labels applied.

~nova REPORTED IMPLEMENTED 1 year, 5 months ago

The preview-allowed preference now exists. This can be a guild or channel-scoped preference.

~nova 1 year, 5 months ago

Assigning keys for documentation of the new preference

~erin 1 year, 4 months ago*

This wasn't implemented as I'd thought it'd be 😖

Enabling preview and disabling preview-allowed disables the preview functionality for message links that point to my server, when posted to another server. It also disables the expansion of message links entirely on the server the setting is applied on. Even if the message originates from that server, or another.

What I had imagined, and thought was clear from prior discussion of this feature was that the desired restriction would only be when a message link was posted to another server. That is, message previewing, and everything else that preview enables would remain active on the server that desires this privacy option, but when the target message refers to the server in question, and the link wasn't posted on that server, an expansion wouldn't take place.

Would you please re-open this ticket?

~luma_inhibitor 1 year, 4 months ago*

I submitted a patch via email but ignore that one because it introduced a typo!!!

woof

diff --git a/messagefuncs.py b/messagefuncs.py
index 63fe0e8a..e6d7cc74 100644
--- a/messagefuncs.py
+++ b/messagefuncs.py
@@ -478,7 +478,7 @@ async def preview_messagelink_function(message, client, args):
                 ).read_message_history
             ):
                 return
-            if not config.get(
+            if message.guild != guild and not config.get(
                 key="preview-allowed", default=True, guild=guild, channel=channel
             ):
                 return
Register here or Log in to comment, or comment via email.