mirror of https://github.com/coddrago/Heroku
1.4.0
- Fix custom security rules cleaner - Fix: use old lib if its version is higher than new onepull/1/head
parent
33c3d3b72b
commit
1ba0d34c7e
|
@ -9,6 +9,7 @@
|
|||
- Fix `.uninstall_hikka` being accessible by sudo
|
||||
- Fix `utils.find_caller` for :method:`hikka.inline.utils.Utils._find_caller_sec_map`
|
||||
- Fix `.eval`
|
||||
- Fix: use old lib if its version is higher than new one
|
||||
- Add more animated emojis to modules
|
||||
- Add targeted security for users and chats (`.tsec`)
|
||||
- Add support for `tg_level` in `.config Tester`
|
||||
|
|
|
@ -1149,7 +1149,7 @@ class Modules:
|
|||
if old_lib.name == lib_obj.name and (
|
||||
not isinstance(getattr(old_lib, "version", None), tuple)
|
||||
and not isinstance(getattr(lib_obj, "version", None), tuple)
|
||||
or old_lib.version == lib_obj.version
|
||||
or old_lib.version >= lib_obj.version
|
||||
):
|
||||
logging.debug(f"Using existing instance of library {old_lib.name}")
|
||||
return old_lib
|
||||
|
|
|
@ -173,11 +173,11 @@ class SecurityManager:
|
|||
self._support = list(set(self._db.get(__name__, "support", []).copy()))
|
||||
for info in self._tsec_user.copy():
|
||||
if info["expires"] < time.time():
|
||||
self._tsec_user.pop(info)
|
||||
self._tsec_user.remove(info)
|
||||
|
||||
for info in self._tsec_chat.copy():
|
||||
if info["expires"] < time.time():
|
||||
self._tsec_chat.pop(info)
|
||||
self._tsec_chat.remove(info)
|
||||
|
||||
async def init(self, client):
|
||||
self._client = client
|
||||
|
|
Loading…
Reference in New Issue