aboutsummaryrefslogtreecommitdiffstats
path: root/slack/util.py
diff options
context:
space:
mode:
authorTrygve Aaberge <trygveaa@gmail.com>2023-01-15 15:07:30 +0100
committerTrygve Aaberge <trygveaa@gmail.com>2024-02-18 11:32:53 +0100
commit74c3a674d30d957f90480a8115224e13dfb7d41d (patch)
treeebb479d7a1f677b5d61f7a6515bdafab979e8489 /slack/util.py
parent4e203c8c410732597f2c43c445a21409b290ef0a (diff)
downloadwee-slack-74c3a674d30d957f90480a8115224e13dfb7d41d.tar.gz
Make methods work for callbacks
Diffstat (limited to 'slack/util.py')
-rw-r--r--slack/util.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/slack/util.py b/slack/util.py
index b5b5bb2..8738748 100644
--- a/slack/util.py
+++ b/slack/util.py
@@ -10,8 +10,9 @@ weechat_callback_return_type = Union[int, str, Dict[str, str], None]
def get_callback_name(callback: Callable[..., weechat_callback_return_type]) -> str:
- shared.weechat_callbacks[callback.__name__] = callback
- return callback.__name__
+ callback_id = f"{callback.__name__}-{id(callback)}"
+ shared.weechat_callbacks[callback_id] = callback
+ return callback_id
def with_color(color: str, string: str):