Commit 0b4b3515 authored by Benjamin Neff's avatar Benjamin Neff Committed by Dennis Schubert

Start sending updated_at timestamp as edited_at for profiles

This can be used in later diaspora versions to order the profile updates
so we don't overwrite a newer profile with older data.
parent 86d52a0d
...@@ -169,6 +169,7 @@ module Diaspora ...@@ -169,6 +169,7 @@ module Diaspora
def self.profile(profile) def self.profile(profile)
DiasporaFederation::Entities::Profile.new( DiasporaFederation::Entities::Profile.new(
author: profile.diaspora_handle, author: profile.diaspora_handle,
edited_at: profile.updated_at,
first_name: profile.first_name, first_name: profile.first_name,
last_name: profile.last_name, last_name: profile.last_name,
image_url: profile.image_url, image_url: profile.image_url,
......
...@@ -201,6 +201,7 @@ describe Diaspora::Federation::Entities do ...@@ -201,6 +201,7 @@ describe Diaspora::Federation::Entities do
expect(federation_entity).to be_instance_of(DiasporaFederation::Entities::Profile) expect(federation_entity).to be_instance_of(DiasporaFederation::Entities::Profile)
expect(federation_entity.author).to eq(diaspora_entity.diaspora_handle) expect(federation_entity.author).to eq(diaspora_entity.diaspora_handle)
expect(federation_entity.edited_at).to eq(diaspora_entity.updated_at)
expect(federation_entity.first_name).to eq(diaspora_entity.first_name) expect(federation_entity.first_name).to eq(diaspora_entity.first_name)
expect(federation_entity.last_name).to eq(diaspora_entity.last_name) expect(federation_entity.last_name).to eq(diaspora_entity.last_name)
expect(federation_entity.image_url).to eq(diaspora_entity.image_url) expect(federation_entity.image_url).to eq(diaspora_entity.image_url)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment