File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -357,24 +357,16 @@ def __get_bot_secret(callback_url: str) -> str:
357357
358358
359359def get_bot_secret (callback_url : str ) -> bytes | None :
360- """Returns the bot's secret from an environment variable or from the application's configuration on the server ."""
360+ """Returns the bot's secret from the environment variable populated when the bot was registered ."""
361361 secret_key = __get_bot_secret (callback_url )
362362 if secret_key in os .environ :
363363 return os .environ [secret_key ].encode ("UTF-8" )
364- secret_value = NextcloudApp ().appconfig_ex .get_value (secret_key )
365- if secret_value is not None :
366- os .environ [secret_key ] = secret_value
367- return secret_value .encode ("UTF-8" )
368364 return None
369365
370366
371367async def aget_bot_secret (callback_url : str ) -> bytes | None :
372- """Returns the bot's secret from an environment variable or from the application's configuration on the server ."""
368+ """Returns the bot's secret from the environment variable populated when the bot was registered ."""
373369 secret_key = __get_bot_secret (callback_url )
374370 if secret_key in os .environ :
375371 return os .environ [secret_key ].encode ("UTF-8" )
376- secret_value = await AsyncNextcloudApp ().appconfig_ex .get_value (secret_key )
377- if secret_value is not None :
378- os .environ [secret_key ] = secret_value
379- return secret_value .encode ("UTF-8" )
380372 return None
You can’t perform that action at this time.
0 commit comments