Create Pleroma.Maps.put_if_present(map, key, value, value_fun // &{:ok, &1})
authorHaelwenn <contact+git.pleroma.social@hacktivis.me>
Fri, 5 Jun 2020 14:48:02 +0000 (14:48 +0000)
committerHaelwenn <contact+git.pleroma.social@hacktivis.me>
Fri, 5 Jun 2020 14:48:02 +0000 (14:48 +0000)
commit54bae06b4fa960eadb9918414f50b9ececc1faa4
tree4baf1d3c36d8e3a1a9f2c678b2e9965de16e468d
parentf5cb1f3616e9cb9430038697532eb49161937dec
Create Pleroma.Maps.put_if_present(map, key, value, value_fun // &{:ok, &1})

Unifies all the similar functions to one and simplify some blocks with it.
14 files changed:
lib/pleroma/helpers/uri_helper.ex
lib/pleroma/maps.ex [new file with mode: 0644]
lib/pleroma/web/activity_pub/activity_pub.ex
lib/pleroma/web/activity_pub/transmogrifier.ex
lib/pleroma/web/activity_pub/utils.ex
lib/pleroma/web/admin_api/controllers/config_controller.ex
lib/pleroma/web/admin_api/controllers/oauth_app_controller.ex
lib/pleroma/web/controller_helper.ex
lib/pleroma/web/feed/tag_controller.ex
lib/pleroma/web/feed/user_controller.ex
lib/pleroma/web/mastodon_api/controllers/account_controller.ex
lib/pleroma/web/mastodon_api/views/app_view.ex
lib/pleroma/web/mastodon_api/views/scheduled_activity_view.ex
lib/pleroma/web/oauth/oauth_controller.ex