Add user and hub to websub client subscriptions.

This commit is contained in:
Roger Braun 2017-04-27 09:44:20 +02:00
parent d1dce56a85
commit e8a311ecff
2 changed files with 13 additions and 0 deletions

View File

@ -1,5 +1,6 @@
defmodule Pleroma.Web.Websub.WebsubClientSubscription do
use Ecto.Schema
alias Pleroma.User
schema "websub_client_subscriptions" do
field :topic, :string
@ -7,6 +8,8 @@ defmodule Pleroma.Web.Websub.WebsubClientSubscription do
field :valid_until, :naive_datetime
field :state, :string
field :subscribers, {:array, :string}, default: []
field :hub, :string
belongs_to :user, User
timestamps()
end

View File

@ -0,0 +1,10 @@
defmodule Pleroma.Repo.Migrations.AddUserAndHub do
use Ecto.Migration
def change do
alter table(:websub_client_subscriptions) do
add :hub, :string
add :user_id, references(:users)
end
end
end