Typos
This commit is contained in:
parent
89db0bb24d
commit
62c746bab7
3 changed files with 5 additions and 5 deletions
|
@ -16,7 +16,7 @@ logger = structlog.get_logger(__name__)
|
|||
app = Quart(__name__)
|
||||
available_platforms = {}
|
||||
plugins = get_available_plugins()
|
||||
enabled_plugins = [plugin for plugin_name, plugin in plugins.items() if plugin in ENABLED_PLUGINS]
|
||||
enabled_plugins = [plugin for plugin_name, plugin in plugins.items() if plugin_name in ENABLED_PLUGINS]
|
||||
|
||||
|
||||
@app.before_serving
|
||||
|
|
|
@ -19,10 +19,10 @@ class SlackAPI:
|
|||
pass
|
||||
|
||||
@classmethod
|
||||
async def send_message(cls, platform, message, thread: Optional[Text] = None):
|
||||
async def send_message(cls, channel, message, thread: Optional[Text] = None):
|
||||
payload = {
|
||||
"text": message,
|
||||
"platform": platform,
|
||||
"channel": channel,
|
||||
}
|
||||
|
||||
if thread:
|
||||
|
|
|
@ -19,7 +19,7 @@ class SlackMethods(PlatformMethods):
|
|||
)
|
||||
try:
|
||||
await SlackAPI.send_message(
|
||||
platform=message.chat, message=message.text, thread=message.reply_to
|
||||
channel=message.chat, message=message.text, thread=message.reply_to
|
||||
)
|
||||
except SlackAPI.SlackClientError as error:
|
||||
logger.error(
|
||||
|
@ -65,6 +65,6 @@ class SlackPlatform(Platform):
|
|||
id=data["event"].get("thread_ts", data["event"]["ts"]),
|
||||
date=datetime.fromtimestamp(int(float(data["event"]["event_ts"]))),
|
||||
text=data["event"]["text"],
|
||||
chat=data["event"]["platform"],
|
||||
chat=data["event"]["channel"],
|
||||
raw=data,
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue