Python backend for a Slack's kudos plugin.
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Added HomeView very minimum version

+39
+39
kefi/routers/views.py
··· 1 1 from slack_sdk.models.blocks import ( 2 + ActionsBlock, 3 + ButtonElement, 2 4 ContextBlock, 3 5 DividerBlock, 4 6 ImageElement, ··· 80 82 SectionBlock(text=MarkdownTextObject(text="*¿Cambio de planes?*")), 81 83 ], 82 84 ) 85 + 86 + class HomeView(View): 87 + def __init__(self, *args, **kwargs): 88 + 89 + super().__init__( 90 + type="home", 91 + title="Bienvenido a Kefi", 92 + close="Cerrar", 93 + # TODO: not needed: submit=PlainTextObject(text="No asistiré"), 94 + blocks=[ 95 + SectionBlock( 96 + text=MarkdownTextObject( 97 + text="*:wave: ¡Ei! ¡Nos vemos en la Kefi Plaza!*" 98 + ) 99 + ), 100 + DividerBlock(), 101 + SectionBlock( 102 + text=MarkdownTextObject( 103 + text="This is so much fun!" 104 + ), 105 + accessory=ImageElement( 106 + image_url="https://api.slack.com/img/blocks/bkb_template_images/notifications.png", 107 + alt_text="calendar thumbnail", 108 + ), 109 + ), 110 + DividerBlock(), 111 + ContextBlock( 112 + elements=[ 113 + MarkdownTextObject( 114 + text="*:white_check_mark: Has indicado que asistirás.*" 115 + ) 116 + ] 117 + ), 118 + DividerBlock(), 119 + SectionBlock(text=MarkdownTextObject(text="*¿Cambio de planes?*")), 120 + ], 121 + )