Skip to content

Commit

Permalink
Use optional flag for discovery entities instead of default value
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperTux88 committed Feb 14, 2018
1 parent b274cc3 commit c0b1417
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions lib/diaspora_federation/discovery/h_card.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class HCard < Entity
# @!attribute [r] nickname
# The first part of the diaspora* ID
# @return [String] nickname
property :nickname, :string, default: nil
property :nickname, :string, optional: true

# @!attribute [r] full_name
# @return [String] display name of the user
Expand All @@ -60,7 +60,7 @@ class HCard < Entity
# installations).
#
# @return [String] link to the pod
property :url, :string, default: nil
property :url, :string, optional: true

# @!attribute [r] public_key
# When a user is created on the pod, the pod MUST generate a pgp keypair
Expand Down
8 changes: 4 additions & 4 deletions lib/diaspora_federation/discovery/web_finger.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class WebFinger < Entity

# @!attribute [r] profile_url
# @return [String] link to the users profile
property :profile_url, :string, default: nil
property :profile_url, :string, optional: true

# @!attribute [r] atom_url
# This atom feed is an Activity Stream of the user's public posts. diaspora*
Expand All @@ -55,18 +55,18 @@ class WebFinger < Entity
# Note that this feed MAY also be made available through the PubSubHubbub
# mechanism by supplying a <link rel="hub"> in the atom feed itself.
# @return [String] atom feed url
property :atom_url, :string, default: nil
property :atom_url, :string, optional: true

# @!attribute [r] salmon_url
# @note could be nil
# @return [String] salmon endpoint url
# @see https://cdn.rawgit.com/salmon-protocol/salmon-protocol/master/draft-panzer-salmon-00.html#SMLR
# Panzer draft for Salmon, paragraph 3.3
property :salmon_url, :string, default: nil
property :salmon_url, :string, optional: true

# @!attribute [r] subscribe_url
# This url is used to find another user on the home-pod of the user in the webfinger.
property :subscribe_url, :string, default: nil
property :subscribe_url, :string, optional: true

# +hcard_url+ link relation
REL_HCARD = "http://microformats.org/profile/hcard".freeze
Expand Down

0 comments on commit c0b1417

Please sign in to comment.