Skip to content

Commit

Permalink
Production (#28)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
jacklowrie authored Nov 26, 2022
1 parent e545ac7 commit a56e799
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@
from sqlalchemy import select
from urllib import parse


import re
from tinydb import TinyDB, Query

import logging
logger = logging.getLogger(__name__)
Expand Down Expand Up @@ -130,13 +128,13 @@ def update_forum_id(ack, respond, command, context):

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


if forum_id is None:
client.chat_postEphemeral(
text=error,
Expand Down

0 comments on commit a56e799

Please sign in to comment.