Ashish Bhate
9521797b15
MM-40148: threadsOnly query param for user threads ( #19833 )
...
* MM-40148: threadsOnly query param for user threads
Currently we always calculate counts when fetching user threads.
Those counts include total, unread replies, and unread mentions,
and are potentially expensive to calculate.
This commit adds a new query param 'threadsOnly' which won't calculate
any counts and just return threads.
Co-authored-by: koox00 <3829551+koox00@users.noreply.github.com >
Co-authored-by: Mattermod <mattermod@users.noreply.github.com >
2022-04-04 17:50:13 +05:30
Jesse Hallam
6757edc4e2
MM-41349: CRT, fix LastUpdated semantics ( #19523 )
...
* deadcode: remove UpdateChannelLastViewedAt
* deadcode: remove ThreadStore.(Save(Multiple)|Update|Delete)
* deadcode: followThead in App.MarkChannelAsUnreadFromPost
* document ThreadMembership, Thread structs
* maintain LastUpdated consistently
Whenever we touch a `ThreadMembership` record, we should be setting `LastUpdated` to the current timestamp. The mobile client relies on this to detect changes to these records.
* simplify: never updateThreads from `App.MarkChannelAsUnreadFromPost`
Change all invocations of `ChannelStore.UpdateLastViewedAtPost` from `App.MarkChannelAsUnreadFromPost` to pass `updateThreads` as `false`. When `ChannelStore.UpdateLastViewedAtPost` was invoked with `updateThreads` as `true`, it would in turn call `ThreadStore.UpdateUnreadsByChannel` but pass `updateViewedTimestamp` as `false`. This effectively updated the `LastUpdated` field of the corresponding thread memberships but never touched any of the actual data (such as `LastViewed`).
The overall CRT feature continued to work, because `App.MarkChannelAsUnreadFromPost` directly updates the relevant thread memberships via `ThreadStore.MaintainMembership`.
* deadcode: updateThreads in ChannelStore.UpdateLastViewedAtPost
* simplify: never updateThreads from App.SendNotifications
Change all invocations of `ChannelStore.IncrementMentionCount` from
`App.SendNotifications` to pass `updateThreads` as `false`. When `ChannelStore.IncrementMentionCount` was invoked with `updateThreads` as `true`, it would in turn call `ThreadStore.UpdateUnreadsByChannel` but pass `updateViewedTimestamp` as `false`. This effectively updated the `LastUpdated` field of the corresponding thread memberships but never touched any of the actual data (such as `UnreadMentions`).
The overall CRT feature continued to work, because `App.SendNotifications` directly updates the relevant thread memberships mention counts via `ThreadStore.MaintainMembership`.
* deadcode: updateThreads in ChannelStore.IncrementMentionCount
* fix & rename ThreadStore.UpdateUnreadsByChannel
Rename `ThreadStore.UpdateUnreadsByChannel` to `ThreadStore.UpdateLastViewedByThreadIds`, making it unconditionally set the `LastViewed` for the given threads (as well as `LastUpdated`).
All previous invocations of this method that passed `updateViewedTimestamp` have been previously removed.
* unrelated gofmt -w -s changes to satisfy linter
* always set LastUpdated to model.GetMillis()
* deadcode: ThreadStore.SaveMembership
* fix TestMarkUnreadWithThreads
* GetMasterX
2022-02-28 16:24:34 -04:00
Claudio Costa
92837fa1ee
[MM-22051] Remove To/From JSON ( #18070 )
...
* Posts
* Add missing translation
* Fix internal store marshaling
* [MM-22051] Remove To/From JSON (Channels) (#18116 )
* Channels
* Channel members
* ChannelSearch
* Channel categories, list, sidebar, stats, view
* Fix conversions
* [MM-22051] Remove To/From JSON (Users) (#18121 )
* User related structs
* Fix return
* Team related structures (#18127 )
* [MM-22051] Remove To/From JSON (Status, Bot, Reaction, Thread, FileInfo) (#18130 )
* Status
* Bot
* Reaction
* Thread
* FileInfo
* Some fixes
* Translations update from Weblate (#18143 )
* Translated using Weblate (German)
Currently translated at 100.0% (2309 of 2309 strings)
Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/de/
* Translated using Weblate (Turkish)
Currently translated at 100.0% (2309 of 2309 strings)
Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/tr/
* Translated using Weblate (Hungarian)
Currently translated at 100.0% (2309 of 2309 strings)
Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/hu/
* Update translation files
Updated by "Cleanup translation files" hook in Weblate.
Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/
Update translation files
Updated by "Cleanup translation files" hook in Weblate.
Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/
Update translation files
Updated by "Cleanup translation files" hook in Weblate.
Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/
Update translation files
Updated by "Cleanup translation files" hook in Weblate.
Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/
* Translated using Weblate (German)
Currently translated at 100.0% (2301 of 2301 strings)
Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/de/
* Translated using Weblate (Turkish)
Currently translated at 100.0% (2301 of 2301 strings)
Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/tr/
* Translated using Weblate (Hungarian)
Currently translated at 100.0% (2301 of 2301 strings)
Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/hu/
* Translated using Weblate (English (Australia))
Currently translated at 100.0% (2301 of 2301 strings)
Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/en_AU/
* Translated using Weblate (Bulgarian)
Currently translated at 100.0% (2301 of 2301 strings)
Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/bg/
* Translated using Weblate (Japanese)
Currently translated at 100.0% (2301 of 2301 strings)
Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/ja/
* Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (2301 of 2301 strings)
Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/zh_Hans/
Co-authored-by: JtheBAB <srast@bioc.uzh.ch >
Co-authored-by: Kaya Zeren <kayazeren@gmail.com >
Co-authored-by: Tóth Csaba // Online ERP Hungary Kft <csaba.toth@online-erp.hu >
Co-authored-by: Matthew Williams <Matthew.Williams@outlook.com.au >
Co-authored-by: Nikolai Zahariev <nikolaiz@yahoo.com >
Co-authored-by: kaakaa <stooner.hoe@gmail.com >
Co-authored-by: aeomin <lin@aeomin.net >
Co-authored-by: Weblate (bot) <hosted@weblate.org >
Co-authored-by: JtheBAB <srast@bioc.uzh.ch >
Co-authored-by: Kaya Zeren <kayazeren@gmail.com >
Co-authored-by: Tóth Csaba // Online ERP Hungary Kft <csaba.toth@online-erp.hu >
Co-authored-by: Matthew Williams <Matthew.Williams@outlook.com.au >
Co-authored-by: Nikolai Zahariev <nikolaiz@yahoo.com >
Co-authored-by: kaakaa <stooner.hoe@gmail.com >
Co-authored-by: aeomin <lin@aeomin.net >
* [MM-22051] Remove To/From JSON methods from model (#18138 )
* Scheme
* Role
* Session
* Config
* Status
* Fix logic
* Emoji
* GuestsInvite
* Group
* Command
* ClusterInfo
* License
* Job
* System
* Plugin
* Command2
* IncomingWebhook
* OutgoingWebhook
* Fix tests
* Update traslation
* Some fixes
* Add missing return
* Simplify
* Make Config.ToJSONFiltered() return []byte
* Make Busy.ToJSON() return []byte
* Include error in log
* Split logic
* [MM-22051] Remove To/From JSON (final) (#18150 )
* SwitchRequest
* PluginEventData
* Permalink
* PushNotification
* SuggestCommand
* PluginsResponse
* WebSocketMessage
* RemoteCluster
* SharedChannel
* PluginStatuses
* InitialLoad
* ClusterDiscovery
* ClusterStats
* MfaSecret
* GroupSyncable
* SAML
* WebSocketRequest
* TypingRequest
* SecurityBulletin
* OAuthApp
* IntegrationAction
* DataRetention
* Preference
* FileInfoList
* Compliance
* Preferences
* FileInfoSearchResults
* TermsOfService
* InstallMarketplacePluginRequest
* GitLabUser
* UploadSessions
* Remove unused helpers
* Fix tests
* [MM-23280] Fix linting for ToJSON/FromJSON (#18153 )
* SwitchRequest
* PluginEventData
* Permalink
* PushNotification
* SuggestCommand
* PluginsResponse
* WebSocketMessage
* RemoteCluster
* SharedChannel
* PluginStatuses
* InitialLoad
* ClusterDiscovery
* ClusterStats
* MfaSecret
* GroupSyncable
* SAML
* WebSocketRequest
* TypingRequest
* SecurityBulletin
* OAuthApp
* IntegrationAction
* DataRetention
* Preference
* FileInfoList
* Compliance
* Preferences
* FileInfoSearchResults
* TermsOfService
* InstallMarketplacePluginRequest
* GitLabUser
* UploadSessions
* Remove unused helpers
* Fix tests
* Fix linting for ToJSON/FromJSON
* Fix conversions
Co-authored-by: Weblate (bot) <hosted@weblate.org >
Co-authored-by: JtheBAB <srast@bioc.uzh.ch >
Co-authored-by: Kaya Zeren <kayazeren@gmail.com >
Co-authored-by: Tóth Csaba // Online ERP Hungary Kft <csaba.toth@online-erp.hu >
Co-authored-by: Matthew Williams <Matthew.Williams@outlook.com.au >
Co-authored-by: Nikolai Zahariev <nikolaiz@yahoo.com >
Co-authored-by: kaakaa <stooner.hoe@gmail.com >
Co-authored-by: aeomin <lin@aeomin.net >
Co-authored-by: Mattermod <mattermod@users.noreply.github.com >
2021-09-01 14:43:12 +02:00
Joram Wilander
a0cc420e2a
MM-35392 Load thread unreads for other teams on app load ( #17944 )
...
* Add ability to include thread unreads in team unreads api response
* Do not include GMs/DMs in team unreads for threads
* Fix bad merge
2021-07-22 10:24:20 -04:00
Eli Yukelzon
23d51ed1f2
MM-32655 - Collapsed threads websocket handling ( #16909 )
...
Co-authored-by: Mattermod <mattermod@users.noreply.github.com >
2021-03-02 16:49:00 +02:00
Eli Yukelzon
13616cac0f
MM-31711 - Implement cursor paging for threads ( #16748 )
...
Co-authored-by: Mattermod <mattermod@users.noreply.github.com >
2021-01-31 12:28:14 +02:00
Eli Yukelzon
bb7e5b6e9d
MM-31712 Server/API: Unreads-only filter for GetUserThreads ( #16660 )
...
Co-authored-by: Mattermod <mattermod@users.noreply.github.com >
2021-01-31 11:54:35 +02:00
Eli Yukelzon
77da23e84b
MM-31713 Server/API: GetUserThread method ( #16659 )
...
Co-authored-by: Mattermod <mattermod@users.noreply.github.com >
2021-01-28 18:07:39 +02:00
Eli Yukelzon
911d1f070e
MM-31710 Server/API: change total_unread_replies to total_unread_threads ( #16663 )
...
Co-authored-by: Mattermod <mattermod@users.noreply.github.com >
2021-01-19 13:33:57 +02:00
Eli Yukelzon
86e228b6c6
MM-30558 - Add unreadReplies and unreadMentions to thread membership ( #16304 )
2020-12-06 10:02:53 +02:00
Eli Yukelzon
c2036f614e
MM-30970 Add Basic unreadMentions support for collapsed threads ( #16407 )
...
Co-authored-by: Mattermod <mattermod@users.noreply.github.com >
2020-12-01 17:20:23 +02:00
Eli Yukelzon
cf4df5fcd2
MM-30048 added thread related socket messages ( #16234 )
...
Co-authored-by: Mattermod <mattermod@users.noreply.github.com >
2020-11-20 11:00:52 +02:00
Eli Yukelzon
45e340b5be
MM-29987 Implement new collapsed threads API ( #16091 )
2020-11-08 10:36:46 +02:00
Eli Yukelzon
fe352ab57f
MM-29703 Mark threads as read when channels are marked ( #15994 )
...
Co-authored-by: Jesús Espino <jespinog@gmail.com >
2020-10-30 17:00:21 +02:00
Eli Yukelzon
8844141df3
MM-28249 Auto follow threads ( #15878 )
...
Co-authored-by: Mattermod <mattermod@users.noreply.github.com >
2020-10-15 18:01:16 +03:00
Eli Yukelzon
595248b10e
MM-28247 Threads metadata table ( #15571 )
2020-10-01 18:48:38 +03:00