diff --git a/src/store.ts b/src/store.ts
index 1ddc5970f44b11546188f8f589f8c8008747e85e..9cbed77118b92ade3ff61ec46fd4d2751610f955 100644
--- a/src/store.ts
+++ b/src/store.ts
@@ -303,7 +303,11 @@ export class DiscordStore implements IAppserviceStorageProvider {
         const rows = await this.db.All('SELECT * FROM user_activity');
         const users: {[mxid: string]: any} = {};
         for (const row of rows) {
-            users[row.user_id as string] = JSON.parse(row.data as any);
+            let data = row.data as any;
+            if (typeof data === 'string') { // sqlite has no first-class JSON
+                data = JSON.parse(data);
+            }
+            users[row.user_id as string] = data;
         }
         return { users };
     }