* Remove watermelondb limitation on updating an already updated model
* Add logic to handle different prepare states and improve logging
* fix tests
---------
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
* Init
* Test fix
* New sync implementation
* misc
* Includes migration and other servers sync
* Misc
* Migration fix
* Migration is done version 7
* Update app/queries/servers/thread.ts
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
* Update app/database/operator/server_data_operator/handlers/team_threads_sync.ts
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
* Feedback changes
* Fixes when old thread gets a reply
* Fix
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
* Add terms of service
* Add i18n
* Fix test
* Address feedback
* Address ux feedback
* Update texts
* Avoid Review to show on top of ToS
Co-authored-by: Daniel Espino <danielespino@MacBook-Pro-de-Daniel.local>
* Ensure no unresolved types in the definition files
* Address feedback and general cleanup
* Move import from @constants/x to @constants where relevant
* Remove unneeded "import as"
* added MENU_ITEM_HEIGHT to constant/view
* fix user presence and your profile
* added MENU_ITEM_HEIGHT to constant/view
* fix user presence and your profile
* UI Polish - Custom Status
* UI Polish - Settings
* UI Polish - logout
* refactored styles
* removed 'throws DataOperatorException' from './database/`
* fix for copy link option
* fix autoresponder
1. user should be allowed to enter paragraph
2. the OOO was not immediately being updated on the notification main screen. The fix is to cal fetchStatusInBatch after the updateMe operation
* About Screen - code clean up
* removed MenuItem component from common_post_options
* removed MenuItem from Settings
* refactored show_more and recent_item
* removed menu_item component
* Update setting_container.tsx
* PR review correction
* Update setting_container.tsx
* Update recent_item.tsx
* First approach
* Lint
* Fixes and adding monitoring console statements (to be removed later)
* Add pagination and apply graphQL also to login
* Get all entry points to use the same GQL call
* Unify gql handling
* Use graphQL on websocket reconnect
* Handle latest changes regarding categories
* Use graphQL to properly fetch channel members on other servers
* Remove logs and fetch unreads from other teams
* Minor fixes
* Final fixes
* Address feedback, minor refactoring, and fixes around the refactor
* Fix custom status duration types
* Add missing fields and some reordering
* Add timeout to fetch posts for unread channels
* removed useless throw in comment
* fix ts for useNavButtonPressed
* update server db 'relationship config file'
adding missing relationship between ThreadsInTeam and Thread table. we will have to update the pngs and the others as well but we can do that once we get a license to the DB Schema app
* Update post.ts
* WIP
* Actions updated to fetch remote first, and local on error
* Groups fetch and save
* PR Feedback: prepare vs store and undefined fix
* Forgot to add file
* Groups Mention WIP
* Groups highlight!
* Merge, PR Feedback
* PR Feedback
* PR Feedback: Try/Catch blocks
* PR Feedback
* Rebased with PR feedback
* Exclusion fix, plus id order
* Tidies up iterations
* Loops updated
* Update app/database/operator/server_data_operator/handlers/group.ts
Co-authored-by: Avinash Lingaloo <avinashlng1080@gmail.com>
* PR Feedback: Remove unnecessary prepare/store methods
* Newline ESLint error
* Extracts out id generation for group-associations
* Batches if not fetchOnly
Co-authored-by: Avinash Lingaloo <avinashlng1080@gmail.com>
* Add column last_fetched_at to MyChannel & Thread tables and the migration
* Fix schema tests
* Handle lastFetchAt, retrieve threads on init and properly observe thread unreads (#6436)
* [Gekidou] Set lastFetchAt when fetching posts for a channel (#6437)
* Set lastFetchAt when fetching posts for a channel
* When resetting _preparedState set always to null
* Revert changes in WS
* Handle and set lastFetchedAt for MyChannel in iOS push notification
* feedback review
* iOS fallback to last post createAt if no lastFetchAt set
* Handle lastFetchAt on Android push notifications
* create storePostsForChannel local action
* Fix iOS fallback to last post create_at
Co-authored-by: Daniel Espino García <larkox@gmail.com>
* Improve handlers to only create/update needed recors and add loading indicator while posts are being loaded
* Tweak team handlers
* check for delete_at as falsey
* more handler tweaks
* Preference handler
* Small refactor on category body
* Add WS reconnect FETCHING_POSTS event
* Fix handleChannelViewedEvent when channel screen is not visible
* Replace blinking dot with spinner
* update snapshots to reflect the new spinner
* WIP
* Actions updated to fetch remote first, and local on error
* Groups fetch and save
* PR Feedback: prepare vs store and undefined fix
* Forgot to add file
* Update database to hold if a user is a team or channel admin
* TeamMembership identifier
* Fix handleTeamMembership test
* Update server.md
Co-authored-by: Avinash Lingaloo <avinashlng1080@gmail.com>
* Channel Info screen
* Delete the channel & related data when archiving while viewing archived channels is off
* feedback review
* UX feedback
* Add missing isOptionItem prop
* CRT fixes for MM-44210 & MM-44156
* Covered other conditions and renamed variables to be consistent
Co-authored-by: Anurag Shivarathri <anurag6713@gmail.com>
* Preparing thread data as well with prepareDeletePost
* observing the post directly to prevent the crash until the data issue is found
* mark as read, delete threeds fix
* Update thread.ts
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
* Fixes
* Updated snapshot
* Excluding current user from getting updated
* Doesn't handle users if it's empty
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
* Sets values on my_channel according to CRT
* Team counts with regard to CRT
* Fixes myChannel.is_unread with regard to CRT
* Include DM/GMs for thread counts on demand
* Incorporate thread mention counts in server/channel
* Channel updates in regard to CRT
* Fix add DM screen and some other database related issues
* Minor style fixes
* Handle create DM/GM websocket by using the teammate ids
* Address feedback
* started with the diagrams
* removed redundant tables
next step:
1. reconstruct id ( local id vs server id )
2. annotate fields with examples
3. recreate relationship
* work in progress
* work in progress
* fix association
* update postsInChannel
* removed SlashCommands from the Server database schema
* added missing associations in the models and updated docs/database
* exported server database
* update test
* code corrections following review
* update relationship
* update docs
* removed cyclic relationship
* Revert "removed cyclic relationship"
This reverts commit 4d784efb81.
* removed isOptional from Draft
* linked myChannelSettings to myChannel instead of Channel
* update diagrams
* store null instead of empty string
* update thread association
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
* [Gekidou HOTFIX] fixes saving threads in the DB
`loadedInGlobalThreads` cannot be a property of the thread, the DB will
fail with unknown column upon saving.
This commit makes it an argument of handleThreads and
handleThreadInTeam.
Fixes wrong foreignKey in THREAD table associations.
* Fixes errors
* Fixes error
* Fix search bar style
* MM-42983 Align mention badge on channel list item
* MM-42985 polish channel intro UI
* MM-42984 update fonts on 'Show' bottom sheet
* MM-42982 Increase tap area of back button on channel view
* Set StatusBar style based on theme sidebarBg
* Reconnect other WS after 20 seconds insted of 5
* Only fetch missing profiles for DM/GMs
* Database prepare records optimization
* Do not use fallbackUsername for storing GM/DM in the database
* fix filter for fetching missing dm/gm
* remove use of indexOf inside another loop
* remove use of includes inside another loop
* remove use of find inside another loop
* Add missing translations
* disable Flipper on iOS
* Remove Flipper code from AppDelegate
* feedback review
* trim DM display name to make sure is not empty
* fixing missing direct channels display name
* UI/UX feedback
* fix WS channel viewed and mark as unread
* Remove duplicate emojis from reaction bar
* wip checkin
* wip checkin because my system is messed up again
* correct the add user and remove user from channel functions. THe user and channel ids sometimes come from the broudcast field, not the data object
* remove old comments
* remove old comments
* remove old comments
* add back in unarchive handler. handleChannelUpdateEvent will also update the deleteAt value for a channel, but does not get called when unarchive from the channel view, only through the system console.
* nit remove empty line
* wip
* wip
* remove handleChannelConvertedEvent
* remove handleChannelDirectAddedEvent
* wip
* wip
* wip
* Fix websockets events
* Address feedback
* Ensure categories and some refactoring
* Self review fixes
* Fix category creation bug
* Address feedback and minor improvements
* Address feedback
* Fix lint
Co-authored-by: Daniel Espino García <larkox@gmail.com>
* WS Events, Actions, Queries, Thread Follow, Post Query
* i18n changes
* Misc
* Only unread threads are marked as read
* Mark threads from WS even as visible in Global threads
* Merge fixes
* Update thread_post_list.tsx
* Merge fix
* Feedback fix
* Make teamId in handleThreads optional for unfollowed threads
* Removed unwated type and return
* Review changes
* Removing unused model
* Merge fix
* Misc fixes
* Following button query change
* Refactors thread and threads_in_team tables
The convention is that only threads being in the ThreadsInTeam will be shown in a thread list,
and that only threads marked as loaded_in_global_threads are being shown
in the All threads tab in the list.
So when a thread arrives through different means, whether it's a WS event,
or just fetching a (*new) thread by opening it in a channel, etc...
we'll need to check if it's newer than any of the existing threads in the all threads list.
If it is it will be added in the ThreadsInTeam and will be marked as loaded_in_global_threads: true.
If it's not newer but it is an unread thread it will still be added in the ThreadsInTeam
but marked as loaded_in_global_threads: false.
This commit refactors `loaded_in_global_threads` field from the Thread table
to the ThreadsInTeam table so that the above is possible.
* Update tests
* Addresses review comments
* added remote_id to user table schema
* update user model to accomodate for remote_id field
* transform - reaction - split into its own file
* update user transformer
* update isShared function
* Fix typescript
* make remote_id field optional
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
* Adds threads in team database table and handlers
DM/GM channels have no team ID. This makes it troublesome to paginate
threads in a team. The issue is that whenever a DM/GM thread is fetched
from pagination it will be added in all teams in that server,
potentially creating gaps in between threads for those teams.
This PR inserts a new table in the DB ThreadsInTeam which will hold
references of threads loaded in which server.
Thread lists then would have to rely on that table to show threads.
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
Co-authored-by: Avinash Lingaloo <avinashlng1080@gmail.com>
* Use localPath when available
* Revert changes to replace space for dash in the filename
* Rename other action to external and always call onDownloadSuccess if defined
* add missing localization strings
* Thread screen
* misc
* Added snapshot for ThreadOverview
* Updated snapshot
* Misc
* Updated snapshot and ts fixes
* Made thread as a modal, fixes post list not closing on tablet
* Removed unsued variables
* Putting back the empty space before the root post (inverse list footer)
* Changed input text
* Removed empty footer space
* Misc fixes
* Disables new messages line for thread
* Loading threads before opening modal & BottomSheet componentId fix
* Moved merge navigation options to switchToThread
* Moved LeftButton to switch to thread
* Removed Q.and
* Misc fixes
* Added task id for pagination
* Removed useMemo, Q.and
* move thread close button as a prop
* Remove title font styles to use default
* Misc changes
* Misc fix
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>