Made avatar retrieval optional by introducing the allow action gate.
This commit is contained in:
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user