From c23d931dd43e1ca248a71df495b39c6830a8a718 Mon Sep 17 00:00:00 2001 From: f Date: Thu, 22 Feb 2024 18:04:56 -0300 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20usar=20el=20m=C3=A9todo=20correcto?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/deploy_social_distributed_press.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/deploy_social_distributed_press.rb b/app/models/deploy_social_distributed_press.rb index 29670d3b..7f761e46 100644 --- a/app/models/deploy_social_distributed_press.rb +++ b/app/models/deploy_social_distributed_press.rb @@ -90,7 +90,7 @@ class DeploySocialDistributedPress < Deploy response = hook_client.put(event: event, hook: webhook) - raise ArgumentError, response.parsed_body unless response.ok? + raise ArgumentError, response.body unless response.ok? rescue ArgumentError => e ExceptionNotifier.notify_exception(e, data: { site_id: site.name, usuarie_id: rol.usuarie_id }) end From c02a9762068284586f5c636dc98694613774b21e Mon Sep 17 00:00:00 2001 From: f Date: Thu, 22 Feb 2024 18:08:48 -0300 Subject: [PATCH 2/2] feat: poder acceder a la inbox --- app/models/social_inbox.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/models/social_inbox.rb b/app/models/social_inbox.rb index 036aa02b..21b0ca45 100644 --- a/app/models/social_inbox.rb +++ b/app/models/social_inbox.rb @@ -2,6 +2,7 @@ require 'distributed_press/v1/social/client' require 'distributed_press/v1/social/hook' +require 'distributed_press/v1/social/inbox' require 'distributed_press/v1/social/dereferencer' require 'httparty/cache/store/redis' @@ -43,6 +44,11 @@ class SocialInbox ) end + # @return [DistributedPress::V1::Social::Inbox] + def inbox + @inbox ||= DistributedPress::V1::Social::Inbox.new(client: client, actor: actor) + end + # @return [DistributedPress::V1::Social::Dereferencer] def dereferencer @dereferencer ||= DistributedPress::V1::Social::Dereferencer.new(client: client)