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

Configure Feed

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

feat: added kefi coin icon

+10 -8
+3 -3
kefi/models/helpers.py
··· 128 128 "amount": 100, 129 129 "header_template": "¡Gracias {receiver_name}!", 130 130 "message_template": "Mensaje de {sender_name}:\n _{message}_", 131 - "context_template": ":moneybag: *{sender_name}* le da a *{receiver_name}* {amount} kefis.", 131 + "context_template": "*{sender_name}* le da a *{receiver_name}* {amount} kefis.", 132 132 "image": "https://storage.staging.dekaside.com/kefi/static/images/kudos.png", 133 133 }, 134 134 { ··· 136 136 "amount": 25, 137 137 "header_template": "¡Enhorabuena {receiver_name}! :trophy:", 138 138 "message_template": "Mensaje de {sender_name}:\n _{message}_", 139 - "context_template": ":moneybag: *{sender_name}* le da a *{receiver_name}* {amount} kefis.", 139 + "context_template": "*{sender_name}* le da a *{receiver_name}* {amount} kefis.", 140 140 "image": "https://storage.staging.dekaside.com/kefi/static/images/congrats.png", 141 141 }, 142 142 { ··· 144 144 "amount": 5, 145 145 "header_template": "¡{sender_name} le envía un high five a {receiver_name}! :hand:", 146 146 "message_template": "_{message}_", 147 - "context_template": ":moneybag: *{sender_name}* le da a *{receiver_name}* {amount} kefis.", 147 + "context_template": "*{sender_name}* le da a *{receiver_name}* {amount} kefis.", 148 148 "image": "https://storage.staging.dekaside.com/kefi/static/images/highfive.png", 149 149 }, 150 150 ]
+2 -2
kefi/models/outputs.py
··· 1 - from typing import List, Optional 1 + from typing import List, Optional, Union 2 2 3 3 from pydantic import BaseModel 4 4 ··· 63 63 """Context block""" 64 64 65 65 type: str = "context" 66 - elements: List[Text] 66 + elements: List[Union[Text, Image]] 67 67 68 68 69 69 class Response(BaseModel):
+5 -3
kefi/routers/responses.py
··· 1 1 from typing import Any, Dict, List, Optional 2 2 3 - from slack_sdk.models.attachments import ActionButton 4 - 5 3 from kefi.models.database import Action, User 6 4 from kefi.models.outputs import ( 7 5 Context, ··· 112 110 blocks.append( 113 111 Context( 114 112 elements=[ 113 + Image( 114 + image_url="https://storage.staging.dekaside.com/kefi/static/images/coin.png", 115 + alt_text="Kefis", 116 + ), 115 117 MarkDown( 116 118 text=self.action.context_template.format( 117 119 sender_name=f"@{self.sender.slack_username}", 118 120 receiver_name=f"@{self.receiver.slack_username}", 119 121 amount=self.action.amount, 120 122 ) 121 - ) 123 + ), 122 124 ] 123 125 ) 124 126 )
kefi/static/images/coin.png

This is a binary file and will not be displayed.