0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-07-11 04:58:40 +02:00

modules/client/profile: Reuse the profile::set() path in fetch().

This commit is contained in:
Jason Volk 2019-03-07 12:13:44 -08:00
parent 5adfb3ba43
commit cc14164dc8

View file

@ -436,7 +436,6 @@ ircd::m::user::profile::fetch(const m::user &user,
create(user);
const m::user::profile profile{user};
const m::user::room &user_room{user};
for(const auto &member : response)
{
bool exists{false};
@ -446,13 +445,8 @@ ircd::m::user::profile::fetch(const m::user &user,
exists = member.second == val;
});
if(exists)
continue;
send(user_room, user.user_id, "ircd.profile", member.first,
{
{ "text", member.second }
});
if(!exists)
profile.set(user, member.first, member.second);
}
}