slk 0.4.1 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/lib/slk/commands/thread.rb +27 -9
- data/lib/slk/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6f36dfb6d59a99e348d4bd14d49eea6b3c77c9a7d077a59adc769529eee94a24
|
|
4
|
+
data.tar.gz: f91ab312427b50df2b0938c8112d9057ab66b78f82eff31857a70b2e1b056a23
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7e8e1ce4a53ead893a1c2275cac500aea5e3b78b46caeee31d8343e33e3598df27a4518fcb1d1322a4780b3b17b8472b2fdd319d740f0d918282a133a010f9d7
|
|
7
|
+
data.tar.gz: 93d461ceacd6924ecf0b2758609f492a8d16e0919dc8288babbe0717416722e230dfbd991c3e119850c528463831636154fe3259197d8af5b4671b2ac3f53bd8
|
data/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.4.2] - 2026-03-01
|
|
11
|
+
|
|
10
12
|
### Added
|
|
11
13
|
|
|
12
14
|
- **Ghostty/Kitty terminal support** - Inline emoji images now work in Ghostty and Kitty terminals
|
|
@@ -30,6 +32,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
30
32
|
- New `MessageResolver` service extracted from activity command for reuse
|
|
31
33
|
- Refactored formatters to use shared TextProcessor
|
|
32
34
|
|
|
35
|
+
### Fixed
|
|
36
|
+
|
|
37
|
+
- **`thread` command** - Fixed fetching wrong message when using `slk thread <url>`
|
|
38
|
+
- Now uses `conversations.replies` directly instead of `conversations.history` with limit 1
|
|
39
|
+
- Previously could return the wrong message if newer messages existed in the channel
|
|
40
|
+
- Tightened URL validation to reject non-message URLs (e.g. channel-only URLs) early
|
|
41
|
+
|
|
33
42
|
## [0.4.0] - 2026-01-30
|
|
34
43
|
|
|
35
44
|
### Added
|
|
@@ -122,6 +131,7 @@ Initial release of the Ruby rewrite. Pure Ruby, no external dependencies.
|
|
|
122
131
|
- Pure Ruby stdlib - no gem dependencies
|
|
123
132
|
- Ruby 3.2+ with modern features (Data.define, pattern matching)
|
|
124
133
|
|
|
134
|
+
[0.4.2]: https://github.com/ericboehs/slk/releases/tag/v0.4.2
|
|
125
135
|
[0.4.0]: https://github.com/ericboehs/slk/releases/tag/v0.4.0
|
|
126
136
|
[0.3.0]: https://github.com/ericboehs/slk/releases/tag/v0.3.0
|
|
127
137
|
[0.2.0]: https://github.com/ericboehs/slk/releases/tag/v0.2.0
|
data/lib/slk/commands/thread.rb
CHANGED
|
@@ -12,9 +12,30 @@ module Slk
|
|
|
12
12
|
|
|
13
13
|
target = positional_args.first
|
|
14
14
|
return usage_error unless target
|
|
15
|
-
return url_required_error unless Support::SlackUrlParser.new.slack_url?(target)
|
|
16
15
|
|
|
17
|
-
|
|
16
|
+
parsed = Support::SlackUrlParser.new.parse(target)
|
|
17
|
+
return url_required_error unless parsed&.message?
|
|
18
|
+
|
|
19
|
+
resolved = target_resolver.resolve(target, default_workspace: target_workspaces.first)
|
|
20
|
+
fetch_and_display_messages(resolved)
|
|
21
|
+
rescue ApiError => e
|
|
22
|
+
error("Failed to fetch messages: #{e.message}")
|
|
23
|
+
1
|
|
24
|
+
rescue ArgumentError => e
|
|
25
|
+
error(e.message)
|
|
26
|
+
1
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def fetch_and_display_messages(resolved)
|
|
30
|
+
ts = resolved.thread_ts || resolved.msg_ts
|
|
31
|
+
return message_url_required_error unless ts
|
|
32
|
+
|
|
33
|
+
api = runner.conversations_api(resolved.workspace.name)
|
|
34
|
+
raw = fetch_all_thread_replies(api, resolved.channel_id, ts)
|
|
35
|
+
messages = raw.map { |m| Models::Message.from_api(m, channel_id: resolved.channel_id) }
|
|
36
|
+
|
|
37
|
+
output_messages(messages, resolved.workspace, resolved.channel_id)
|
|
38
|
+
0
|
|
18
39
|
end
|
|
19
40
|
|
|
20
41
|
protected
|
|
@@ -25,16 +46,13 @@ module Slk
|
|
|
25
46
|
end
|
|
26
47
|
|
|
27
48
|
def url_required_error
|
|
28
|
-
error('thread command requires a Slack URL')
|
|
49
|
+
error('thread command requires a Slack message URL')
|
|
29
50
|
1
|
|
30
51
|
end
|
|
31
52
|
|
|
32
|
-
def
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
limit_set: true, # Prevent apply_default_limit from overriding
|
|
36
|
-
threads: true
|
|
37
|
-
)
|
|
53
|
+
def message_url_required_error
|
|
54
|
+
error('URL must point to a specific message (not just a channel)')
|
|
55
|
+
1
|
|
38
56
|
end
|
|
39
57
|
|
|
40
58
|
def help_text
|
data/lib/slk/version.rb
CHANGED