chat_sdk-x 0.7.0 → 0.8.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d4625c1b778c0e928f63220a262746f6e0f936324f04227d6089b90aef2b4f4e
4
- data.tar.gz: 51c114854c79621bdd093b06bc0d1f7a040533ea38f943ce7f6b9bfae056b51c
3
+ metadata.gz: c0268010c9db7fac8c879b00c0612242482c6d8a482b3a301b6817205c514a52
4
+ data.tar.gz: f5099d980b6c5c20731811fd48f560a88e8f9d79df40f08d37ecd699907fd4d9
5
5
  SHA512:
6
- metadata.gz: 2efbc539d669d2b631cd7c1200a8f1fe5defc9f2e8288669d49ca0dd4d872b7fc0976b8251f685ae7c32ce6b6a540823b9918a45aca80f8f767297619c7a2209
7
- data.tar.gz: 7665fbb3b51567a21a4abf0007853845ed13a902f3cf1483e4b08eba2c5f23408e31001ebbb16f870f09af5d5de99ae8d01e113932bd977bd634802acd8809e2
6
+ metadata.gz: decc80efcb1b116b2cda75678f3f2ab53d42aafffe5f71d4a1bb0e1a6bce9befd91ed42017b7adea69ec5b1f6d0f8d1ef14aeb97acacea8aa54ad229b2ae7970
7
+ data.tar.gz: f9665c2b2642fab38b369888e88cfd3b5384b6d21d1da0f83e32157a4e1942eca97e6e39233ff64c6f827ec9f28ae253ed604eaf3708fb1fba23e0d19c86e5ea
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ChatSDK
4
+ module X
5
+ class FormatConverter < ChatSDK::Format::Converter
6
+ # X (Twitter) → Markdown (pass-through, X posts are plain text)
7
+ def to_markdown(platform_text)
8
+ platform_text.to_s
9
+ end
10
+
11
+ def from_markdown(markdown)
12
+ text = markdown.to_s
13
+ return "" if text.empty?
14
+
15
+ strip_markdown(text)
16
+ end
17
+ end
18
+ end
19
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chat_sdk-x
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Quentin Rousseau
@@ -48,6 +48,7 @@ files:
48
48
  - lib/chat_sdk/x/adapter.rb
49
49
  - lib/chat_sdk/x/api_client.rb
50
50
  - lib/chat_sdk/x/event_parser.rb
51
+ - lib/chat_sdk/x/format_converter.rb
51
52
  homepage: https://github.com/rootlyhq/chat-sdk
52
53
  licenses:
53
54
  - MIT