Skip to content

Commit

Permalink
fix(getUser): deal with unexpected notifications structure
Browse files Browse the repository at this point in the history
  • Loading branch information
clins1994 committed Jun 28, 2024
1 parent 693f205 commit b777878
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/miscRequests.js
Original file line number Diff line number Diff line change
Expand Up @@ -412,8 +412,8 @@ module.exports = {
following: parseFloat(/,"following":([0-9]*?),/.exec(data)?.[1] || 0),
followers: parseFloat(/,"followers":([0-9]*?),/.exec(data)?.[1] || 0),
notifications: {
following: parseFloat(/"notification_count":\{"following":([0-9]*),/.exec(data)?.[1] || 0),
user: parseFloat(/"notification_count":\{"following":[0-9]*,"user":([0-9]*)/.exec(data)?.[1] || 0),
following: parseFloat(/"notification_count":\{"following":([0-9]*),/.exec(data)?.[1] ?? 0),
user: parseFloat(/"notification_count":\{"following":[0-9]*,"user":([0-9]*)/.exec(data)?.[1] ?? 0),
},
session,
signature,
Expand Down

0 comments on commit b777878

Please sign in to comment.