Skip to content

Commit

Permalink
Merge pull request #133 from CaptainFact/staging
Browse files Browse the repository at this point in the history
Release 1.0.1
  • Loading branch information
Betree authored Mar 25, 2019
2 parents bf7fc04 + f6c6b87 commit 8179359
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 12 deletions.
10 changes: 5 additions & 5 deletions apps/cf/lib/notifications/subscriptions_matcher.ex
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ defmodule CF.Notifications.SubscriptionsMatcher do
)
when not is_nil(reply_to_id) do
Subscription
|> where([s], s.user_id != ^user_id)
|> where([s], s.user_id != ^user_id and s.is_subscribed == true)
|> where(
[s],
(s.comment_id == ^reply_to_id and s.scope == ^:comment) or
Expand All @@ -41,7 +41,7 @@ defmodule CF.Notifications.SubscriptionsMatcher do

def match_action(action = %{entity: :comment, type: :create, user_id: user_id}) do
Subscription
|> where([s], s.user_id != ^user_id)
|> where([s], s.user_id != ^user_id and s.is_subscribed == true)
|> where(
[s],
(s.statement_id == ^action.statement_id and s.scope == ^:statement) or
Expand All @@ -54,7 +54,7 @@ defmodule CF.Notifications.SubscriptionsMatcher do
def match_action(action = %{entity: :statement, type: type, user_id: user_id})
when type in [:update, :remove, :create] do
Subscription
|> where([s], s.user_id != ^user_id)
|> where([s], s.user_id != ^user_id and s.is_subscribed == true)
|> where(
[s],
(s.statement_id == ^action.statement_id and s.scope == ^:statement) or
Expand All @@ -66,7 +66,7 @@ defmodule CF.Notifications.SubscriptionsMatcher do

def match_action(%{entity: :video, type: :update, video_id: video_id, user_id: user_id}) do
Subscription
|> where([s], s.user_id != ^user_id)
|> where([s], s.user_id != ^user_id and s.is_subscribed == true)
|> where([s], s.scope == ^:video)
|> where([s], s.video_id == ^video_id)
|> Repo.all()
Expand All @@ -76,7 +76,7 @@ defmodule CF.Notifications.SubscriptionsMatcher do
def match_action(%{entity: :speaker, type: type, video_id: video_id, user_id: user_id})
when type in [:add, :remove] do
Subscription
|> where([s], s.user_id != ^user_id)
|> where([s], s.user_id != ^user_id and s.is_subscribed == true)
|> where([s], s.scope == ^:video)
|> where([s], s.video_id == ^video_id)
|> Repo.all()
Expand Down
2 changes: 1 addition & 1 deletion apps/cf/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ defmodule CF.Mixfile do
def project do
[
app: :cf,
version: "1.0.0",
version: "1.0.1",
build_path: "../../_build",
compilers: [:phoenix, :gettext] ++ Mix.compilers(),
config_path: "../../config/config.exs",
Expand Down
2 changes: 1 addition & 1 deletion apps/cf_atom_feed/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ defmodule CF.AtomFeed.Mixfile do
def project do
[
app: :cf_atom_feed,
version: "1.0.0",
version: "1.0.1",
build_path: "../../_build",
config_path: "../../config/config.exs",
deps_path: "../../deps",
Expand Down
2 changes: 1 addition & 1 deletion apps/cf_graphql/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ defmodule CF.Graphql.Mixfile do
def project do
[
app: :cf_graphql,
version: "1.0.0",
version: "1.0.1",
build_path: "../../_build",
config_path: "../../config/config.exs",
deps_path: "../../deps",
Expand Down
2 changes: 1 addition & 1 deletion apps/cf_jobs/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ defmodule CF.Jobs.Mixfile do
def project do
[
app: :cf_jobs,
version: "1.0.0",
version: "1.0.1",
build_path: "../../_build",
config_path: "../../config/config.exs",
deps_path: "../../deps",
Expand Down
2 changes: 1 addition & 1 deletion apps/cf_opengraph/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ defmodule CF.Opengraph.MixProject do
def project do
[
app: :cf_opengraph,
version: "1.0.0",
version: "1.0.1",
elixir: "~> 1.6",
start_permanent: Mix.env() == :prod,
deps: deps(),
Expand Down
2 changes: 1 addition & 1 deletion apps/cf_rest_api/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ defmodule CF.RestApi.Mixfile do
def project do
[
app: :cf_rest_api,
version: "1.0.0",
version: "1.0.1",
build_path: "../../_build",
compilers: [:phoenix, :gettext] ++ Mix.compilers(),
config_path: "../../config/config.exs",
Expand Down
2 changes: 1 addition & 1 deletion apps/db/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ defmodule DB.Mixfile do
def project do
[
app: :db,
version: "1.0.0",
version: "1.0.1",
build_path: "../../_build",
config_path: "../../config/config.exs",
deps_path: "../../deps",
Expand Down

0 comments on commit 8179359

Please sign in to comment.