Skip to content

Commit

Permalink
auxin supports groups now (#190)
Browse files Browse the repository at this point in the history
* auxin supports groups now

* refactor into check_valid_recipient
  • Loading branch information
technillogue authored Apr 29, 2022
1 parent bee98f1 commit edada47
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions forest/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,17 @@ def rpc(
}


def check_valid_recipient(recipient: str) -> bool:
try:
assert recipient == utils.signal_format(recipient)
except (AssertionError, NumberParseException):
try:
assert recipient == str(uuid.UUID(recipient))
except (AssertionError, ValueError):
return False
return True


async def get_attachment_paths(message: Message) -> list[str]:
if not utils.AUXIN:
return [
Expand Down

0 comments on commit edada47

Please sign in to comment.