diff --git a/Gemfile.lock b/Gemfile.lock index 907aff4..05a904c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - linkedin_orbit (0.0.2) + linkedin_orbit (0.1.1) dotenv (~> 2.7) http (~> 4.4) json (~> 2.5) diff --git a/lib/linkedin_orbit/interactions/comment.rb b/lib/linkedin_orbit/interactions/comment.rb index 4fc8192..ab5163e 100644 --- a/lib/linkedin_orbit/interactions/comment.rb +++ b/lib/linkedin_orbit/interactions/comment.rb @@ -37,6 +37,7 @@ def construct_body { activity: { activity_type: "linkedin:comment", + tags: ["channel:linkedin"], title: "Commented on LinkedIn Post", description: construct_description, occurred_at: Time.at(@comment["created"]["time"] / 1000).utc, diff --git a/lib/linkedin_orbit/version.rb b/lib/linkedin_orbit/version.rb index 4aaad52..01ec8e9 100644 --- a/lib/linkedin_orbit/version.rb +++ b/lib/linkedin_orbit/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module LinkedinOrbit - VERSION = "0.1.0" + VERSION = "0.1.1" end \ No newline at end of file diff --git a/scripts/check_comments.rb b/scripts/check_comments.rb index 200e089..2f171d2 100644 --- a/scripts/check_comments.rb +++ b/scripts/check_comments.rb @@ -1,7 +1,7 @@ #!/usr/bin/env ruby # frozen_string_literal: true -require "dev_orbit" +require "linkedin_orbit" require "thor" module LinkedinOrbit diff --git a/spec/interactions/comment_spec.rb b/spec/interactions/comment_spec.rb index 2a022e8..4b2e34f 100644 --- a/spec/interactions/comment_spec.rb +++ b/spec/interactions/comment_spec.rb @@ -32,7 +32,7 @@ stub_request(:post, "https://app.orbit.love/api/v1/1234/activities") .with( headers: { 'Authorization' => "Bearer 12345", 'Content-Type' => 'application/json' }, - body: "{\"activity\":{\"activity_type\":\"linkedin:comment\",\"title\":\"Commented on LinkedIn Post\",\"description\":\"LinkedIn post: \\\"Sample Title...\\\"\\n\\n\\nComment:\\n\\n\\n\\\"Sample Text\\\"\\n\",\"occurred_at\":\"2016-03-02 23:00:00 UTC\",\"key\":\"12345\",\"link\":\"https://www.linkedin.com/feed/update/urn:li:activity:6793941564394651648\",\"member\":{\"name\":\"John Smith\"}},\"identity\":{\"source\":\"linkedin\",\"name\":\"John Smith\",\"uid\":\"1234567\"}}" + body: "{\"activity\":{\"activity_type\":\"linkedin:comment\",\"tags\":[\"channel:linkedin\"],\"title\":\"Commented on LinkedIn Post\",\"description\":\"LinkedIn post: \\\"Sample Title...\\\"\\n\\n\\nComment:\\n\\n\\n\\\"Sample Text\\\"\\n\",\"occurred_at\":\"2016-03-02 23:00:00 UTC\",\"key\":\"12345\",\"link\":\"https://www.linkedin.com/feed/update/urn:li:activity:6793941564394651648\",\"member\":{\"name\":\"John Smith\"}},\"identity\":{\"source\":\"linkedin\",\"name\":\"John Smith\",\"uid\":\"1234567\"}}" ) .to_return( status: 200,