Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to post link to canvas without unfurl? #1654

Open
primko opened this issue Feb 13, 2025 · 1 comment
Open

How to post link to canvas without unfurl? #1654

primko opened this issue Feb 13, 2025 · 1 comment
Labels
needs info An issue that is claimed to be a bug and hasn't been reproduced, or otherwise needs more info

Comments

@primko
Copy link

primko commented Feb 13, 2025

The Slack SDK version
"slack-sdk>=3.34.0"

Python runtime version
Python 3.12.3

OS info
ProductName: macOS
ProductVersion: 14.5
BuildVersion: 23F79
Darwin Kernel Version 23.5.0: Wed May 1 20:14:38 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T6020

How to post link to canvas without unfurl?

slack_client.canvases_create(
            title=title, document_content=canvas_content
        )

canvas_info = slack_client.files_info(file=response["canvas_id"])

slack_client.chat_postMessage(
       channel=channel_id,
       text=f"<{canvas_info.data['file']['permalink']}|{title}>",
       unfurl_links=False,
       unfurl_media=False
)

I tried sending as text, a block with markdown

blocks=[
    {
        "type": "context",
        "elements": [
            {
                "type": "mrkdwn",
                "text": f"<{canvas_info.data['file']['permalink']}|{title}>",
            }
        ],
    }
],

and a context block – all without success. The canvas expands in the preview, and unfurl_links=False, unfurl_media=False do not work.

@misscoded misscoded added needs info An issue that is claimed to be a bug and hasn't been reproduced, or otherwise needs more info and removed untriaged labels Feb 14, 2025
@misscoded
Copy link
Contributor

Hi @primko 👋🏼 I've also been unable to prevent an unfurl when testing the behavior, and have reached out to the Canvas team to better understand if this is a current limitation or not. Will let you know once I hear back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs info An issue that is claimed to be a bug and hasn't been reproduced, or otherwise needs more info
Projects
None yet
Development

No branches or pull requests

2 participants