* Always switch to user we just logged in as
If we're logged in and switch to anon and then use login to get into our previous account instead of using 'switch accounts', we only updated the JWT but we didn't switch to the user.
* Fix getToken unaware of multi-auth middleware
If we use login with new credentials while switched to anon (multi_auth.user-id === 'anonymous'), we updated the pubkey because getToken wasn't aware of the switch and thus believed we're logged in as a user.
This is fixed by applying the middleware before calling getToken.
* Fix mentions for pessimistic actions
* (item)mentions should use tx not models
---------
Co-authored-by: Keyan <34140557+huumn@users.noreply.github.com>
Co-authored-by: k00b <k00b@stacker.news>
* Fix 'Cannot mix BigInt and other types' on zaps
* Also add sybilFeePercent to context in worker
* add paymentMethod to context
---------
Co-authored-by: k00b <k00b@stacker.news>
* Derive wallet status from logs
* Add send/recv icons
* Set status individually for send and recv
* Move status logic into own function
* Add LNbits, Blink, CLN, LND, phoenixd logo
* Fix wallet.status.any not using Status enum
* Fix WebLN being weird
* Use phoenixd logo with text
* Also use wallet logo on config page
* Also poll logs for wallet status
* Use logger.info for logs not relevant for wallet status
* Remove no longer used wallet badges
* Crop LND logo like other logos
* Fix all wallets show 'configure'
* Fix wallet status not respecting enabled
* Fix wallet.def.requiresConfig undefined
* Fix banner shown for WebLN
* Fix attach shown when configured
* Filter by context.status to determine wallet status
* Fix +- shown without context
* Fix missing theme support for wallet logos
* fix uploaded videos don't load on safari
* fix safari loading video as image, min-content restored
* refinements for ssr and skip load check for images
---------
Co-authored-by: Keyan <34140557+huumn@users.noreply.github.com>
Co-authored-by: k00b <k00b@stacker.news>
* fix: reply storage is updated with the new content on file upload
* Revert "fix: reply storage is updated with the new content on file upload"
This reverts commit 350931fd0c7a47ffe59716722755ab294c481b71.
* chore: reworked image draft save by using events
* chore: helpers.setValue called just after setNativeValue
* chore: updated setNativeValue function to be more use-case specific
* fix: upvote widget not rendered when comment is collapsed
* fix: restored missing conditional on handleShortPress
* chore: icon horizontal space maintained even if the comment is collapsed
* chore: 'rendered' argument renamed to 'visible'
* chore: collapsed condition merged with the 'disabled' variable
* reduce unecessary code
---------
Co-authored-by: Keyan <34140557+huumn@users.noreply.github.com>
Co-authored-by: k00b <k00b@stacker.news>
If an item has a lot of comments, it gets ranked higher.
When an item is now downzapped, it can become outlawed but still show up on the front page because of the comments.
This fixes it by filtering outlawed items out instead of relying on the ranking to make them not show up.
* Clarify conditions to show edit countdown
* Fix edit countdown shown for deleted items
* refactor: Minimize canEdit state
I noticed that only anonEdit requires state because it needs to use useEffect to fetch from local storage.
The other conditions can simply be checked during render.
* refactor: Use datePivot for edit countdown