Made avatar retrieval optional by introducing the allow action gate.

This commit is contained in:
Lyncoln
2026-10-26 09:44:54 -04:00
parent 92b6fb3aa0
commit 6cd35d7d64
4 changed files with 48 additions and 36 deletions
+12 -10
View File
@@ -6,6 +6,8 @@ kind = "action"
showstatus = True
allowaction = os.environ.get("UPDATE_AVATARS", True)
resolve = {
"get": {
"sender": ["messageheaders", "userCard", "id"],
@@ -69,18 +71,18 @@ headers = {
#}
filters = [
# {
# "filterkey": "avatar_hash",
# "operator": "==",
# "filtervalue": {"outputs": "db_avatar_hash"},
# "print": f"User avatar up to date. Skipping {name}...",
# },
{
"filterkey": "uploadimage",
"operator": "is",
"filtervalue": None,
"print": f"No avatar for upload. Skipping {name}...",
"filterkey": "avatar_hash",
"operator": "==",
"filtervalue": {"outputs": "db_avatar_hash"},
"print": f"User avatar up to date. Skipping {name}...",
},
# {
# "filterkey": "uploadimage",
# "operator": "is",
# "filtervalue": None,
# "print": f"No avatar for upload. Skipping {name}...",
# },
]
#saverow = {