Skip to content

Commit a56e799

Browse files
authored
Production (#28)
* Feature multiple workspaces (#24) (#25) * add app registration manifest and piazza icon * install instructions * readme formatting and clarity * add missing install instructions * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * temp contributing.md * update contributing and add venv to gitignore * bugfix: threaded message replies * install script * update readme * update readme * remove git conflict * update instructions to include install script * Feature reply in thread (#16) * Update issue templates * Delete CONTRIBUTING.md moving to .github * Revert "Update issue templates" This reverts commit 43cd34f. * Revert "Delete CONTRIBUTING.md" This reverts commit 25384ed. * Update issue templates * Create pull_request_template.md * Create pull_request_template.md * Update README.md * Update README.md * Update issue templates * Update feature_request.md * broadcast replies to unthreaded messages * delte test file * Feature update course (#21) * Develop (#19) * add app registration manifest and piazza icon * install instructions * readme formatting and clarity * add missing install instructions * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * temp contributing.md * update contributing and add venv to gitignore * bugfix: threaded message replies * install script * update readme * update readme * remove git conflict * update instructions to include install script * Feature reply in thread (#16) * Update issue templates * Delete CONTRIBUTING.md moving to .github * Revert "Update issue templates" This reverts commit 43cd34f. * Revert "Delete CONTRIBUTING.md" This reverts commit 25384ed. * Update issue templates * Create pull_request_template.md * Create pull_request_template.md * Update README.md * Update README.md * Update issue templates * Update feature_request.md * broadcast replies to unthreaded messages * delte test file * install tinydb and add slash command to upsert forum ids * remove course id from example .eng * store forum id in tinydb * move error message construction * formatting * formatting * update readme * get forum id for each message sent * add cache, rename Course -> Q (for query), move post_url building to message (#22) * update gitignore * add test message and remove dotenv * remove unnecessary requirements * add DB setup * update DB setup * update DB setup * escape db password * try pymysql * change port back to 443 default * add scopes * change test message to only mention. trying to figure out multimessage thing * change test message to only mention. trying to figure out multimessage thing * debug command * debug command * debug command * fix logging * try a merge * warm the cache * formatting, also save the cache before quitting * update logging level * whoops
1 parent e545ac7 commit a56e799

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

app.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@
1717
from sqlalchemy import select
1818
from urllib import parse
1919

20-
2120
import re
22-
from tinydb import TinyDB, Query
2321

2422
import logging
2523
logger = logging.getLogger(__name__)
@@ -130,13 +128,13 @@ def update_forum_id(ack, respond, command, context):
130128

131129
# Listens for any message with a piazza tag in it. Piazza tags take the form
132130
# "@123", where the number is the id of a post on Piazza.
131+
#
133132
# https://regex101.com/r/eMmguY/1
134133
@app.message(re.compile(r"@(\d+[,|\ |\n|.|?|\r])"))
135134
def post_link(say, context, event, client):
136135
global cache
137136
forum_id = cache.get(context["team_id"], None)
138137

139-
140138
if forum_id is None:
141139
client.chat_postEphemeral(
142140
text=error,

0 commit comments

Comments
 (0)