about summary refs log tree commit diff
path: root/src/state/models/profile-view.ts
diff options
context:
space:
mode:
authorPaul Frazee <pfrazee@gmail.com>2022-11-11 14:15:43 -0600
committerPaul Frazee <pfrazee@gmail.com>2022-11-11 14:15:43 -0600
commit38ed9a794353ae89c5c311dcecab00f0313ec675 (patch)
tree1dd289dce051a8bb6f4a4f33bb6540ae73637ce6 /src/state/models/profile-view.ts
parentfe52d19c485f4cdaec3b35ca31f5e9e7b44ff975 (diff)
downloadvoidsky-38ed9a794353ae89c5c311dcecab00f0313ec675.tar.zst
Implement profile updates
Diffstat (limited to 'src/state/models/profile-view.ts')
-rw-r--r--src/state/models/profile-view.ts5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/state/models/profile-view.ts b/src/state/models/profile-view.ts
index a64c07339..2cb481936 100644
--- a/src/state/models/profile-view.ts
+++ b/src/state/models/profile-view.ts
@@ -111,10 +111,7 @@ export class ProfileViewModel {
   }
 
   async updateProfile(fn: (existing?: Profile.Record) => Profile.Record) {
-    if (this.did !== this.rootStore.me.did) {
-      throw new Error('Not your profile!')
-    }
-    await apilib.updateProfile(this.rootStore, fn)
+    await apilib.updateProfile(this.rootStore, this.did, fn)
     await this.refresh()
   }