Optimize model upsert, ensure right type for roles

This commit is contained in:
miruka
2019-07-04 18:37:15 -04:00
parent 6b83d79f16
commit 07438150db
8 changed files with 65 additions and 44 deletions

View File

@@ -72,7 +72,7 @@ function onTimelineEventReceived(
"isLocalEcho": is_local_echo,
"showNameLine": show_name_line,
"translatable": translatable,
"targetUserId": target_user_id || "",
"targetUserId": target_user_id,
}
// Replace any matching local echo

View File

@@ -6,7 +6,6 @@ function onAccountDeleted(user_id) {
accounts.popWhere({"userId": user_id}, 1)
}
// TODO: get updated from nio rooms
function onUserUpdated(user_id, display_name, avatar_url, status_message) {
users.upsert({"userId": user_id}, {
"userId": user_id,