Skip to content

Commit c62772d

Browse files
Merge pull request #14 from jesseplusplus/default-circle
Give every new user a default first circle
2 parents 9c93436 + 4bcfe19 commit c62772d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

app/models/concerns/account_interactions.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@ def follow_mapping(query, field)
9898
has_many :conversation_mutes, dependent: :destroy
9999
has_many :domain_blocks, class_name: 'AccountDomainBlock', dependent: :destroy
100100
has_many :announcement_mutes, dependent: :destroy
101+
102+
after_create :create_default_circle
101103
end
102104

103105
def follow!(other_account, reblogs: nil, notify: nil, uri: nil, rate_limit: false, bypass_limit: false)
@@ -283,6 +285,10 @@ def local_followers_hash
283285

284286
private
285287

288+
def create_default_circle
289+
circles.create(name: 'inner circle')
290+
end
291+
286292
def remove_potential_friendship(other_account, mutual = false)
287293
PotentialFriendshipTracker.remove(id, other_account.id)
288294
PotentialFriendshipTracker.remove(other_account.id, id) if mutual

0 commit comments

Comments
 (0)