Ver código fonte

Add user and hub to websub client subscriptions.

tags/v0.9.9
Roger Braun 7 anos atrás
pai
commit
e8a311ecff
2 arquivos alterados com 13 adições e 0 exclusões
  1. +3
    -0
      lib/pleroma/web/websub/websub_client_subscription.ex
  2. +10
    -0
      priv/repo/migrations/20170427054757_add_user_and_hub.exs

+ 3
- 0
lib/pleroma/web/websub/websub_client_subscription.ex Ver arquivo

@@ -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


+ 10
- 0
priv/repo/migrations/20170427054757_add_user_and_hub.exs Ver arquivo

@@ -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

Carregando…
Cancelar
Salvar