aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTrygve Aaberge <trygveaa@gmail.com>2024-01-06 15:04:30 +0100
committerTrygve Aaberge <trygveaa@gmail.com>2024-02-18 11:32:54 +0100
commit30e500d4067a161a3e6ea3161ff3440b6959d263 (patch)
tree10c847d968a4bf68387fa25811423185671c1c91
parentf90dad098b591a4c2e55ede3af6526c007de6229 (diff)
downloadwee-slack-30e500d4067a161a3e6ea3161ff3440b6959d263.tar.gz
Revert "Only use letters for message hashes"
I have display_thread_replies_in_channel and often search for the thread hash in a buffer to scroll between the different messages in the thread. After changing the hashes to use only letters, this has made the search match other messages much more often (matching words including the hash characters), which is inconvenient. This reverts commit 78bdd84765e53d4c33d963f0d3a8c54652b64ca9.
-rw-r--r--slack/slack_conversation.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/slack/slack_conversation.py b/slack/slack_conversation.py
index e39428f..79a3f49 100644
--- a/slack/slack_conversation.py
+++ b/slack/slack_conversation.py
@@ -72,9 +72,7 @@ def sha1_hex(string: str) -> str:
def hash_from_ts(ts: SlackTs) -> str:
- hex_str = sha1_hex(str(ts))
- only_letters = hex_str.translate(str.maketrans("0123456789", "ghijklmnop"))
- return only_letters
+ return sha1_hex(str(ts))
class SlackConversationMessageHashes(Dict[SlackTs, str]):