Module: SocialStream::Ostatus::Models::Tie::ClassMethods

Defined in:
lib/social_stream/ostatus/models/tie.rb

Instance Method Summary collapse

Instance Method Details

#create_from_entry!(entry, receiver) ⇒ Object

Create a new SocialStream::Ostatus::Models::Tie from OStatus entry


9
10
11
12
13
# File 'lib/social_stream/ostatus/models/tie.rb', line 9

def create_from_entry! entry, receiver
  contact = ::Contact.from_entry! entry, receiver
 
  contact.relation_ids = [::Relation::Public.instance.id]
end

#destroy_from_entry!(entry, receiver) ⇒ Object

Remove all SocialStream::Ostatus::Models::Tie from OStatus entry


16
17
18
19
20
# File 'lib/social_stream/ostatus/models/tie.rb', line 16

def destroy_from_entry! entry, receiver
  contact = ::Contact.from_entry! entry, receiver

  contact.relation_ids = []
end