Use conversation mapping objects to get / retrieve context from TwAPI.

This commit is contained in:
Roger Braun 2017-04-30 13:53:26 +02:00
commit 4c8111c334
6 changed files with 71 additions and 18 deletions

View file

@ -13,4 +13,8 @@ defmodule Pleroma.Object do
Repo.one(from object in Object,
where: fragment("? @> ?", object.data, ^%{id: ap_id}))
end
def context_mapping(context) do
%Object{data: %{"id" => context}}
end
end