Skip to content

Commit 9342ada

Browse files
committed
api
1 parent fb100a8 commit 9342ada

File tree

2 files changed

+23
-21
lines changed

2 files changed

+23
-21
lines changed

lib/ap_activities.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ defmodule Bonfire.Social.APActivities do
221221
current_user
222222
) do
223223
# because Peertube doesn't give us details to play/embed the video in the AS JSON
224-
Bonfire.Files.Acts.URLPreviews.maybe_fetch_and_save(current_user, url)
224+
Bonfire.Files.Media.maybe_fetch_and_save(current_user, url)
225225
|> Bonfire.Files.Acts.AttachMedia.cast(changeset, ... || [])
226226

227227
# TODO clean up: we shouldn't be reaching into the Acts outside of Epics

lib/api/social_api_graphql.ex

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,8 @@ if Application.compile_env(:bonfire_api_graphql, :modularity) != :disabled and
111111
resolve(&the_activity_object/3)
112112
end
113113

114-
field :media, :media, description: "Media attached to this activity (TODO)"
114+
# TODO
115+
# field :media, :media, description: "Media attached to this activity"
115116

116117
field(:object_post_content, :post_content) do
117118
resolve(fn
@@ -185,34 +186,35 @@ if Application.compile_env(:bonfire_api_graphql, :modularity) != :disabled and
185186
# end
186187
end
187188

188-
# TODO move to bonfire_files
189-
object :media do
190-
field :id, non_null(:id)
189+
# NOTE: :media object and connection moved to Bonfire.Files.API.GraphQL
191190

192-
field :path, :string
191+
# object :media do
192+
# field :id, non_null(:id)
193193

194-
field :size, :integer
194+
# field :path, :string
195195

196-
field :media_type, :string
196+
# field :size, :integer
197197

198-
field :metadata, :json
198+
# field :media_type, :string
199199

200-
field :creator, :any_character do
201-
resolve(Absinthe.Resolution.Helpers.dataloader(Needle.Pointer))
202-
end
200+
# field :metadata, :json
203201

204-
field(:activity, :activity, description: "An activity associated with this media")
202+
# field :creator, :any_character do
203+
# resolve(Absinthe.Resolution.Helpers.dataloader(Needle.Pointer))
204+
# end
205205

206-
field(:activities, list_of(:activity),
207-
description: "All activities associated with this media (TODO)"
208-
)
206+
# field(:activity, :activity, description: "An activity associated with this media")
209207

210-
field(:objects, list_of(:any_context),
211-
description: "All objects associated with this media (TODO)"
212-
)
213-
end
208+
# field(:activities, list_of(:activity),
209+
# description: "All activities associated with this media (TODO)"
210+
# )
211+
212+
# field(:objects, list_of(:any_context),
213+
# description: "All objects associated with this media (TODO)"
214+
# )
215+
# end
214216

215-
connection(node_type: :media)
217+
# connection(node_type: :media)
216218

217219
# object :posts_page do
218220
# field(:page_info, non_null(:page_info))

0 commit comments

Comments
 (0)