Configuration options

Required config

SLACKCHAT_SLACK_VERIFICATION_TOKEN

Slack app verification token.

SLACKCHAT_SLACK_API_TOKEN

Slack app OAuth access token.

Additional config

SLACK_WEBHOOK_VERIFICATION_TOKEN

A custom token that will be sent in webhook notification post data as token. This can be used to verify requests to your renderer’s endpoint come from slackchat.

# default
SLACK_WEBHOOK_VERIFICATION_TOKEN = 'slackchat'

SLACKCHAT_PUBLISH_ROOT

Configuring this to the URL root where your slackchats are published by a renderer will add a direct link to each chat in the Channel Django admin.

# e.g.
SLACKCHAT_PUBLISH_ROOT = 'https://mysite.com/slackchats/'

SLACK_MARKSLACK_USER_TEMPLATE

A function used to create a user_templates object in markslack. The function should take a User instance argument and return a formatted string.

# default
SLACK_MARKSLACK_USER_TEMPLATE = lambda user: '<span class="mention">{} {}</span>'.format(
    user.first_name,
    user.last_name
)

SLACK_MARKSLACK_IMAGE_TEMPLATE

A markslack image_template object.

# default
SLACK_MARKSLACK_IMAGE_TEMPLATE = '<figure><img href="{}" /></figure>'

SLACKCHAT_USER_IMAGE_UPLOAD_TO

A function used to set the upload path used when copying Slack user profile images to your own server.

# default
def default_user_image_upload_to(instance, filename):
    return 'slackchat/users/{0}{1}/{2}'.format(
        instance.first_name,
        instance.last_name,
        filename,
    )

SLACKCHAT_USER_IMAGE_UPLOAD_TO = default_user_image_upload_to