mirror of
https://github.com/matrix-construct/construct
synced 2025-01-14 00:34:18 +01: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);
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue