about summary refs log tree commit diff
path: root/src/state/messages
Commit message (Collapse)AuthorAgeFilesLines
* use an env var for configurable proxy header (#8863)hailey2025-08-262-2/+2
|
* Add displayName to contexts (#8814)Samuel Newman2025-08-144-0/+4
|
* Couple of Sentry cleanups (#8532)Eric Bailey2025-06-202-48/+62
| | | | | | | | | | | | | | | * Temp ignore a couple logs * Add debug for unknown notifications * Nvm let's do this in Sentry * Downgrade two DMs network related issues * Check for network errors before sending in Convo * Do the same for event bus * Fix mistake
* Port post embeds to new arch (#7408)Eric Bailey2025-06-131-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Direct port of embeds to new arch (cherry picked from commit cc3fa1f6cea396dd9222486c633a508bfee1ecd6) * Re-org * Split out ListEmbed and FeedEmbed * Split out ImageEmbed * DRY up a bit * Port over ExternalLinkEmbed * Port over Player and Gif embeds * Migrate ComposerReplyTo * Replace other usages of old post-embeds * Migrate view contexts * Copy pasta VideoEmbed * Copy pasta GifEmbed * Swap in new file location * Clean up * Fix up native * Add back in correct moderation on List and Feed embeds * Format * Prettier * delete old video utils * move bandwidth-estimate.ts * Remove log * Add LazyQuoteEmbed for composer use * Clean up unused things * Remove remaining items * Prettier * Fix imports * Handle nested quotes same as prod * Add back silenced error handling * Fix lint --------- Co-authored-by: Samuel Newman <mozzius@protonmail.com>
* [DMs] Reactions - link up API (attempt 2) (#8074)Samuel Newman2025-03-283-25/+207
| | | | | | | | | | | | | | | | | | | | | | | | | | | * update package * wire up APIs * get reactions to display * allow removing emoji * handle limits better * listen to reactions in log * update convo list with reactions * tweaks to reaction display * Handle empty message fallback case * update package * shift reacts up by 2px --------- Co-authored-by: Eric Bailey <git@esb.lol>
* fix:Conversations don't refresh when going offline and back online (#7985)omar04042025-03-241-3/+8
|
* DMs inbox (#7778)Samuel Newman2025-03-044-9/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * improve error screen * add chat request prompt * mock up inbox * bigger button * use two-button layout * get inbox working somewhat * fix type errors * fetch both pages for badge * don't include read convos in preview * in-chat ui for non-accepted convos (part 1) * add chatstatusinfo * fix status info not disappearing * get chat status info working * change min item height * move files around * add updated sdk * improve badge behaviour * mock up mark all as read * update sdk to 0.14.4 * hide chat status info if initiating convo * fix unread count for deleted accounts * add toasts after rejection * add prompt to delete * adjust badge on desktop * requests -> chat requests * fix height flicker * add mark as read button to header * add mark all as read APIs * separate avatarstack into two components (#7845) * fix messages being hidden behind chatstatusinfo * show inbox preview on empty state * fix empty state again * Use new convo availability API (#7812) * [Inbox] Accept button on convo screen (#7795) * accept button on convo screen * fix types * fix type error * improve spacing * [DMs] Implement new log types (#7835) * optimise badge state * add read message log * add isLogAcceptConvo * mute/unmute convo logs * use setqueriesdata * always show label on button * optimistically update badge * change incorrect unread count change * Update src/screens/Messages/Inbox.tsx Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com> * Update src/screens/Messages/components/RequestButtons.tsx Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com> * Update src/screens/Messages/components/RequestButtons.tsx Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com> * Update src/screens/Messages/components/RequestListItem.tsx Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com> * fix race condition with accepting convo * fix back button on web * filter left convos from badge * update atproto to fix CI * Add accept override external to convo (#7891) * Add accept override external to convo * rm log --------- Co-authored-by: Samuel Newman <mozzius@protonmail.com> --------- Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com> Co-authored-by: Eric Bailey <git@esb.lol>
* init log using `getLog` (#7886)Samuel Newman2025-03-031-8/+9
|
* Logger improvements (#7729)Eric Bailey2025-02-282-41/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Remove enablement * Refactor context and filtering * Fix imports, simplify transports config * Migrate usages of debug context * Re-org, add colors and grouping to console logging * Remove temp default context * Remove manual prefix * Move colorizing out of console transport body * Reduce reuse * Pass through context * Ensure bitdrift is enabled in dev * Enable Sentry on web only * Clean up types * Docs * Format * Update tests * Clean up tests * No positional args * Revert Sentry changes * Clean up context, use it, pass metadata through to Bitdrift * Fix up debugging * Clean up metadata before passing to Bitdrift * Correct transports * Reserve context prop on metadata and include in transports * Update tests
* `@atproto/api@next` integration (#7344)Eric Bailey2025-02-183-28/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Bump SDK * Use consistent type in profile query * Omit from constraint for profile shadow * Replace isRecord with isValidRecord in QuoteEmbed * Omit type from constraint for old ProfileCard * Omit type from constraint in profile queries where appropriate * Use correct type for update profile mutation * Conslidate and fix check for isValidRecord in Post.tsx * Replace isRecord with isValidRecord in PostThreadItem * Remove redundant cast in PostThreadFollowBtn * Ignore errors in DebugMod screen * Use matching type in ProfileFollows screen * Use matching type in ProfileFollowers screen * Migrate to isValidRecord in PostFeedItem * Use matching type if PostRepostedBy * Omit type from constraint in avatar props * Use matching types in NotificationFeedItem * Todo * Use isValidRecord in NotfyFeedItem * Improve MediaPreview types * Migrate another isValidRecord in NotificationFeedItem * Migrate to isValidView in queries/util * Migrate to isValidRecord in threadgate/util * Fix types in threadgates * Fix up types in starter-packs queries * Todo * Specify exact types in search-posts * Use internal type util to align types * Ditto last * Migrate postgate/index * Specify exact types in post-thread * Use correct type in post-quotes * FIX potential bug in post-thread * Use correct type in post-feed * Add correct type guards to notifications/feed * Migrate a guard in notifications/util * Migrate guard in Wizard/State * [@next] Profile handling, migrate `ProfileCard` (#7347) * Introduce new utils for profiles, migrate old ProfileCard * Rename, reorg * Add parseEmbed utils * Expand AnyProfileView to include chat profile view, update post shadow to reflect this * Cast for perf reasons * Tighten up types now that we have AnyProfileView * Add fastIsType util * Use `assertDid` Co-authored-by: Matthieu Sieben <matthieusieben@users.noreply.github.com> * Use util types * Comment * Use fastIsType where no validation was happening before * suggestions (#7382) * suggestions * Revert unneeded changes --------- Co-authored-by: Eric Bailey <git@esb.lol> * Use new util * Rename to dangerousIsType * Convert object shape * Use dangerous util * Use dangerous util * Use dangerous util, we can trust post records * Use dangerous util * Use AnyProfileVIew * Convert object shape * Clean up handling * Patch moderateProfile to accept known profile views, to discuss * Add AnyStarterPackView and related, implement in first usage * Remove validation, fix type, fix ref * Migrate over list-conversations * Clarify intent behind precacheProfile and its unstable query cache * Clean up unstable profile cache * Fix types during label creation in PwiOptOut (#7346) * Tighten types in queries/list * Chat: use correct profile views * Chat: fix log type check * Chat: construct lexically correct shape, even though it's only internal usage * Chat: use correct profile types * Chat: fix type check in logs * Starter: use correct profile types * Starter: use correct profile types * Starter: tighten types to match lex * Any profile type will work in blocked-and-muted * Use dangerous util * Use dangerousIsType * Update new ProfileCard to use AnyProfileView * Use dangerousIsType * Remove outdated todo * Use correct profile type * Use correct profile types * Tighten up types * Use dangerousIsType * Chat: more type fixes * Remove unused file * Add a few utils * Remove unused file * Ignore feedPost.__source * Clean up types, leave validation in critical path * Use dangerousIstype * Use ANyProfileView * Use isValidRecord * Use dangerousIsType * Fix types in ListCard * Fix FeedInterstitials types * Fix types in FeedCard * Fix types in dms ReportDialog * Fix types in SearchablePeopleList * Fix bad type in composer opts * Starter: ok these need to be loose too * Clarify docs Co-authored-by: Matthieu Sieben <matthieusieben@users.noreply.github.com> * Less code Co-authored-by: Matthieu Sieben <matthieusieben@users.noreply.github.com> * Use package exports Co-authored-by: Matthieu Sieben <matthieusieben@users.noreply.github.com> * Use package exports * Bump sdk, update $Typed imports * Format * Format * Fix weird TS error * Remove patch * Beter name * It's memo, can validate * Tighten up parseEmbed, dogfood * Bump sdk * Use asPredicate * Loosen types a bit * use asPredicate * Fix types * Use asPredicate * Use asPredicate * Use asPredicate * Clean up upsertProfile types * Use asPredicate * Use Un util * Fix types * Use new AnyProfileView * Use dangerousIsType * Use asPredicate * Use asPredicate * Add fallback content-type to pass typecheck * Clean up upsertProfile types * Align types * Use dangerousIsType * Use dangerousIsType * Use asPredicate * Align types * Convert findLast * Align types * Just ignore type errors and use findLast * Rename atproto -> bsky * Add validate util * Fix type error * Loosen types * Export post * rename atp bsky * Remove unused code * minor changes * Bump deps * Fix types * Tighten back up loose check * Tighten back up loose check * Fix small bug * Update comment * Revert change --------- Co-authored-by: Matthieu Sieben <matthieusieben@users.noreply.github.com> Co-authored-by: Matthieu Sieben <matthieu.sieben@gmail.com>
* Fix convo header loading state (#7603)Samuel Newman2025-02-033-22/+50
| | | | | | | * get initial convo state from cache * undo useConvoQuery changes * fix shadowing situation with new hook
* fix: typo in filename list-converations (#7036)Renan Mav2024-12-102-2/+2
|
* Reduce calls to getLogs (#6381)Eric Bailey2024-11-151-2/+2
|
* Reduce `listConvos` requests (#6378)Eric Bailey2024-11-151-1/+1
| | | | | | | | | | | | | * Reduce page size for request * Remove refetch interval entirely * Add comment * Optimistically mark as read * Drop default active poll interval to 60s from 5min * Only optimistically update unread count if success
* [🐴] Reduce amount that message sent date is shown (#4228)Samuel Newman2024-10-032-4/+31
|
* [🐴] Option to share via chat in post dropdown (#4231)Samuel Newman2024-05-311-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * add send via chat button to post dropdown (cherry picked from commit d8458c0bc344f993266f7bc7e325d47e40619648) * let usePostQuery take uris with DIDs (cherry picked from commit 16b577ce749fd07e1d5f8461e8ca71c5b874a936) * add embed preview in composer (cherry picked from commit 795ceb98d55b6a3ab5b83187a582f9656d71db69) * rm log (cherry picked from commit 374d6b8869459f08d8442a3a47d67149e8d9ddd4) * remove params properly, or at least as close to (cherry picked from commit c20e0062c2ca4d9c2b28324eee5e713a1a3ab251) * show images in preview (cherry picked from commit 5bb617a3ce00f67bfc79784b2f81ef8dcb5bfc25) * Register embed immediately (cherry picked from commit ee120d5438a2c91c8980288665576d6a29b4c7e7) * Add hover to match embeds (cherry picked from commit 5297a5b06e499f46a9f6da510124610005db2448) * Update post dropdown copy (cherry picked from commit bc7e9f6a4303926a53c5c889f1f1b136faf20491) * Embed preview style tweaks (cherry picked from commit 9e3ccb0f25ac2f3ce6af538bb29112a3e96e01b1) * use hydrated posts from API and just use postembed component (cherry picked from commit cc0b84db87ca812d76cc69f46170ae84cfdde4ef) * fix type error (cherry picked from commit 9c49b940e1248e8a7c3b64190c5cb20750043619) * undo needless export (cherry picked from commit 1186701c997c50c0b29a809637cb9bc061b8c0a0) * fix overflow (cherry picked from commit 8868d5075062d0199c8ef6946fabde27e46ea378) --------- Co-authored-by: Eric Bailey <git@esb.lol>
* [🐴] send record via link in text (Record DMs - base PR) (#4227)Samuel Newman2024-05-311-1/+1
| | | | | * send record via link in text * re-trim text after removing link
* Replace getAgent() with reading agent (#4243)dan2024-05-282-4/+4
| | | | | * Replace getAgent() with agent * Replace {agent} with agent
* [🐴] update convo list from message bus (#4189)Samuel Newman2024-05-243-30/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | * update convo list from message bus * don't increase unread count if you're the sender * add refetch interval back * Fix deleted message state copy * only enable if `hasSession` * Fix logged out handling * increase refetch interval to 60s * request 10s interval when message screen active * use useAppState hook for convo resume/background * Combine forces * fix useFocusEffect logic --------- Co-authored-by: Eric Bailey <git@esb.lol>
* Recover from initial failed firehose state (#4211)Eric Bailey2024-05-241-0/+1
|
* Make sure failed messages enter error state (#4210)Eric Bailey2024-05-241-2/+9
|
* Reduce polling (#4204)Eric Bailey2024-05-232-4/+4
| | | | | | | | | * Reduce polling a bit * Bump to 60 * Increase all * ok 3
* [🐴] Do not init event bus if no session (#4193)Eric Bailey2024-05-231-2/+24
| | | | | | | * Do not init event bus if no session * Be explicit * Simplify, fix log
* Reduce polling when app is backgrounded (#4192)Eric Bailey2024-05-232-1/+8
|
* [🐴] Suspend event bus when switching accounts (#4190)Eric Bailey2024-05-231-5/+4
| | | | | * Suspend event bus when switching accounts * Make effect symmetrical
* remove DMs gate (#4112)Samuel Newman2024-05-201-16/+1
|
* [🐴] Don't retry sends (#4111)Eric Bailey2024-05-201-21/+16
| | | | | * Don't retry sends * Don't retry batch sends
* [🐴] Convo agent cleanup (#4109)Eric Bailey2024-05-192-33/+11
| | | | | | | | | * Move comment, remove unused code * Clean up sending * Remove temp hack * Remove debug
* [🐴] Mod disabled (#4089)Eric Bailey2024-05-174-5/+71
| | | | | * Handle send failures * Add chat disabled state
* Revert "Aggregate quickly-sent messages into batches (#4061)" (#4069)Eric Bailey2024-05-161-23/+17
| | | This reverts commit d424945eed752a366ac201470fdbb66d02999c86.
* Aggregate quickly-sent messages into batches (#4061)Eric Bailey2024-05-161-17/+23
|
* [🐴] Error recovery (#4036)Eric Bailey2024-05-164-59/+165
| | | | | | | | | | | | | | | | | | | | | * Handle block state when sending messages * Handle different pending failures * Use existing profile data to handle blocks * Better cleanup, leave room for more * Attempt recover upon next send * Reset pending failure * Capture unexpected error * Gracefully handle network errors and recovery * Re-align error components and types * Include history fetching in recoverable states
* Remove error for refresh, not necessary (#4034)Eric Bailey2024-05-151-11/+0
|
* [🐴] Better retry styling (#4032)Eric Bailey2024-05-152-28/+27
| | | | | | | | | | | | | * Pass whole object to MessageItem for clarity * Add retry to pending-message * Style send failure, retry * Group pending messages * Remove todos * Fix types with fake message
* Reset after 5 min (#4026)Eric Bailey2024-05-142-7/+27
|
* [🐴] Message drafts (#3993)Samuel Newman2024-05-142-1/+87
| | | | | | | | | | | * drafts * don't throw if no convo ID * Remove labs package --------- Co-authored-by: Eric Bailey <git@esb.lol>
* [🐴] Make status checks easier, fix load state (#4010)Eric Bailey2024-05-143-79/+137
| | | | | | | | | * Make status checks easier, fix load state * Make naming more clear * Split up types for easier re-use * Replace hacky usage
* [🐴] Swap in new package, update usages (#3992)Eric Bailey2024-05-146-75/+27
| | | | | | | * Swap in new package, update usages * Remove uneccessary patch * Override type in safe place
* [🐴] Simplify message passing, cleanup (#3952)Eric Bailey2024-05-103-87/+85
| | | | | * Simplify message passing * Setup/teardown events
* [🐴] Clean up after deleting message (#3950)Eric Bailey2024-05-102-8/+6
| | | | | * Clean up after removal * Remove console
* [🐴] Remove extra spinner states from chat screen (#3947)Hailey2024-05-101-1/+1
| | | | | | | | | | | * remove extra loading states from chat * nits * fix scrolling animation to bottom * nit * move spinner to top
* [🐴] Handle errors, improve styling (#3937)Eric Bailey2024-05-102-32/+60
| | | | | * Handle errors, improve styling * Remove old UI
* Add retries to all handlers (#3935)Eric Bailey2024-05-092-73/+90
|
* [🐴] Integrate event bus (#3915)Eric Bailey2024-05-085-126/+120
| | | | | | | | | | | | | * Integrate event bus * Fixes * Move events mgmt into Convo class * Clean up poll interval updates * Remove unused * Remove annoying log
* [🐴] Refactor event bus (#3919)Eric Bailey2024-05-084-257/+151
| | | | | * Refactor to singleton class outside react * Fix retry, remove debug logs
* Move to requestPollInterval handling (#3914)Eric Bailey2024-05-082-23/+43
|
* [🐴] Reorg convo files (#3909)Eric Bailey2024-05-074-246/+264
| | | | | * Remove unused prop * Reorganize
* [🐴] Unread messages badge (#3901)Samuel Newman2024-05-071-2/+8
| | | | | | | | | | | | | | | | | | | | | * add badge * move stringify logic to hook * add mutation hooks * optimistic mark convo as read * don't count muted chats * Integrate new context * Integrate mark unread mutation * Remove unused edit --------- Co-authored-by: Eric Bailey <git@esb.lol>
* [🐴] Integrate global event bus (#3904)Eric Bailey2024-05-073-1/+65
| | | | | * Conditionally run global event bus * Add current convo id context, bundle providers
* [🐴] State transitions (#3880)Eric Bailey2024-05-072-204/+472
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Handle init/resume/suspend/background and polling * Add debug and temp guard * Make state transitions sync * Make init sync also * Checkpoint: confusing but working state machine * Reducer-esque * Remove poll events * Guard fetchConvo (cherry picked from commit 8385579d31500bb4bfb60afeecdc1eb3ddd7e747) * Clean up polling, make sync (cherry picked from commit 7f75cd04c3bf81c94662785748698640a84bef51) * Update history handling (cherry picked from commit b82b552ba4040adf7ead2377541132a386964ff8) * Check for screen focus in app state listener * Get rid of ad-hoc status checks