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

Configure Feed

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

Merge branch 'develop' into feature/errors

+64 -12
+1
kefi/constants.py
··· 19 19 20 20 21 21 class Actions: 22 + JOIN_MEET: str = "meet_join" 22 23 LEAVE_MEET: str = "meet_leave"
+63 -12
kefi/routers/views.py
··· 3 3 ButtonElement, 4 4 ContextBlock, 5 5 DividerBlock, 6 + HeaderBlock, 6 7 ImageElement, 7 8 MarkdownTextObject, 8 9 PlainTextObject, ··· 10 11 ) 11 12 from slack_sdk.models.views import View 12 13 13 - from kefi.constants import ViewType 14 + from kefi.constants import Actions, ViewType 14 15 from kefi.models.plazas.helpers import get_or_create_current_plaza 15 16 16 17 ··· 92 93 type="home", 93 94 # TODO: not needed: submit=PlainTextObject(text="No asistiré"), 94 95 blocks=[ 96 + HeaderBlock( 97 + text=PlainTextObject(text="Esto es lo que puedes hacer con Kefi:") 98 + ), 99 + HeaderBlock(text=PlainTextObject(text="¡Gracias!")), 95 100 SectionBlock( 96 101 text=MarkdownTextObject( 97 - text="*:wave: ¡Ei! ¡Nos vemos en la Kefi Plaza!*" 98 - ) 102 + text="Hazle llegar tu agradecimiento a un compañero por ayudarte en un proyecto." 103 + ), 104 + accessory=ImageElement( 105 + image_url="https://storage.staging.dekaside.com/kefi/static/images/kudos.png" 106 + ), 107 + ), 108 + ContextBlock( 109 + elements=PlainTextObject(text="/kefi kudos @user [mensaje]") 99 110 ), 100 111 DividerBlock(), 112 + HeaderBlock(text=PlainTextObject(text="¡Enhorabuena!")), 101 113 SectionBlock( 102 - text=MarkdownTextObject(text="This is so much fun!"), 114 + text=MarkdownTextObject( 115 + text="Un trabajo bien hecho, una buena idea, la certificación en un nuevo curso... ¡se merecen una enhorabuena!" 116 + ), 103 117 accessory=ImageElement( 104 - image_url="https://api.slack.com/img/blocks/bkb_template_images/notifications.png", 105 - alt_text="calendar thumbnail", 118 + image_url="https://storage.staging.dekaside.com/kefi/static/images/congrats.png" 106 119 ), 107 120 ), 121 + ContextBlock( 122 + elements=PlainTextObject(text="/kefi congrats @user [mensaje]") 123 + ), 108 124 DividerBlock(), 125 + HeaderBlock(text=PlainTextObject(text="¡High Five!")), 126 + SectionBlock( 127 + text=MarkdownTextObject( 128 + text="Alguien ha sido un buen colega y te ha alegrado el día." 129 + ), 130 + accessory=ImageElement( 131 + image_url="https://storage.staging.dekaside.com/kefi/static/images/congrats.png" 132 + ), 133 + ), 109 134 ContextBlock( 110 - elements=[ 111 - MarkdownTextObject( 112 - text="*:white_check_mark: Has indicado que asistirás.*" 113 - ) 114 - ] 135 + elements=PlainTextObject(text="/kefi highfive @user [mensaje]") 136 + ), 137 + DividerBlock(), 138 + HeaderBlock(text=PlainTextObject(text="Kefi Plaza")), 139 + SectionBlock( 140 + text=MarkdownTextObject( 141 + text="Cada viernes se asignan aleatoriamente grupos de 4 personas en una sala virtual para compartir un Kefi online y hablar de los que más os guste. ¿Te unes?" 142 + ), 143 + accessory=ImageElement( 144 + image_url="https://storage.staging.dekaside.com/kefi/static/images/kefi_plaza.png" 145 + ), 146 + ), 147 + ActionsBlock( 148 + elements=ButtonElement( 149 + text=PlainTextObject(text="¡Me Apunto!"), 150 + action_id=Actions.JOIN_MEET, 151 + ) 152 + ), 153 + DividerBlock(), 154 + HeaderBlock(text=PlainTextObject(text="Consulta tu saldo")), 155 + SectionBlock( 156 + text=MarkdownTextObject( 157 + text="Podrás consultar tu saldo de Kefis pendientes de gastar así como el acumulado en la hucha de recibidos cuantas veces quieras." 158 + ), 115 159 ), 160 + ContextBlock(elements=PlainTextObject(text="/kefi wallet")), 116 161 DividerBlock(), 117 - SectionBlock(text=MarkdownTextObject(text="*¿Cambio de planes?*")), 162 + HeaderBlock(text=PlainTextObject(text="¿Necesitas ayuda?")), 163 + SectionBlock( 164 + text=MarkdownTextObject( 165 + text="No te preocupes, para saber más solo ingresa en el campo de texto de Slack el comando:" 166 + ), 167 + ), 168 + ContextBlock(elements=PlainTextObject(text="/kefi help")), 118 169 ], 119 170 )