mirror of
https://github.com/agessaman/meshcore-bot.git
synced 2026-09-13 11:25:55 +00:00
Add condition to skip short url creation if its an empty string
This commit is contained in:
@@ -76,9 +76,9 @@ def _filter_shorten_url(value: str, ctx: dict[str, Any], args: str) -> str:
|
||||
config = ctx.get('config')
|
||||
if logger is not None:
|
||||
logger.debug("Shortening URL %r", value)
|
||||
if config is None:
|
||||
if config is None or value == '':
|
||||
if logger is not None:
|
||||
logger.debug("Abandoning shorten url due to missing config")
|
||||
logger.debug("Abandoning shorten url due to empty value or config")
|
||||
return value
|
||||
return shorten_url_sync(value, config=config, logger=logger) or value
|
||||
|
||||
|
||||
Reference in New Issue
Block a user