mirror of
https://github.com/matrix-construct/construct
synced 2024-11-16 15:00:51 +01:00
modules/client/login: Fix loss of value data during device tuple assimilation.
modules/client/register: Fix loss of value data during device tuple assimilation.
This commit is contained in:
parent
f6f73e87cb
commit
efd1124cd7
2 changed files with 8 additions and 4 deletions
|
@ -122,14 +122,16 @@ post__login_password(client &client,
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
|
|
||||||
m::device::set(user_id,
|
const json::members device
|
||||||
{
|
{
|
||||||
{ "device_id", device_id },
|
{ "device_id", device_id },
|
||||||
{ "display_name", initial_device_display_name },
|
{ "display_name", initial_device_display_name },
|
||||||
{ "last_seen_ts", ircd::time<milliseconds>() },
|
{ "last_seen_ts", ircd::time<milliseconds>() },
|
||||||
{ "last_seen_ip", last_seen_ip },
|
{ "last_seen_ip", last_seen_ip },
|
||||||
{ "access_token_id", access_token_id },
|
{ "access_token_id", access_token_id },
|
||||||
});
|
};
|
||||||
|
|
||||||
|
m::device::set(user_id, device);
|
||||||
|
|
||||||
// Send response to user
|
// Send response to user
|
||||||
return resource::response
|
return resource::response
|
||||||
|
|
|
@ -334,14 +334,16 @@ register_user(const m::registar &request,
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
|
|
||||||
m::device::set(user_id,
|
const json::members device
|
||||||
{
|
{
|
||||||
{ "device_id", device_id },
|
{ "device_id", device_id },
|
||||||
{ "display_name", initial_device_display_name },
|
{ "display_name", initial_device_display_name },
|
||||||
{ "last_seen_ts", ircd::time<milliseconds>() },
|
{ "last_seen_ts", ircd::time<milliseconds>() },
|
||||||
{ "last_seen_ip", last_seen_ip },
|
{ "last_seen_ip", last_seen_ip },
|
||||||
{ "access_token_id", access_token_id },
|
{ "access_token_id", access_token_id },
|
||||||
});
|
};
|
||||||
|
|
||||||
|
m::device::set(user_id, device);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Send response to user
|
// Send response to user
|
||||||
|
|
Loading…
Reference in a new issue