mirror of
https://github.com/matrix-construct/construct
synced 2024-09-08 17:55:47 +02:00
modules/client/profile: Reuse the profile::set() path in fetch().
This commit is contained in:
parent
5adfb3ba43
commit
cc14164dc8
1 changed files with 2 additions and 8 deletions
|
@ -436,7 +436,6 @@ ircd::m::user::profile::fetch(const m::user &user,
|
||||||
create(user);
|
create(user);
|
||||||
|
|
||||||
const m::user::profile profile{user};
|
const m::user::profile profile{user};
|
||||||
const m::user::room &user_room{user};
|
|
||||||
for(const auto &member : response)
|
for(const auto &member : response)
|
||||||
{
|
{
|
||||||
bool exists{false};
|
bool exists{false};
|
||||||
|
@ -446,13 +445,8 @@ ircd::m::user::profile::fetch(const m::user &user,
|
||||||
exists = member.second == val;
|
exists = member.second == val;
|
||||||
});
|
});
|
||||||
|
|
||||||
if(exists)
|
if(!exists)
|
||||||
continue;
|
profile.set(user, member.first, member.second);
|
||||||
|
|
||||||
send(user_room, user.user_id, "ircd.profile", member.first,
|
|
||||||
{
|
|
||||||
{ "text", member.second }
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue