Skip to content
This repository has been archived by the owner on Sep 13, 2022. It is now read-only.

Addition of filenames field in Posts types #1261

Merged
merged 1 commit into from
Oct 22, 2020

Conversation

vipul08
Copy link
Contributor

@vipul08 vipul08 commented Oct 15, 2020

Summary

This Pull Request adds an additional field filenames in Posts types which is required in the below GitHub issue. With this addition, we will be able to remove compilation error in the post_body.tsx (migration from jsx to tsx).

Ticket Link

mattermost/mattermost#15440

@mattermod
Copy link
Contributor

Hello @vipul08,

Thanks for your pull request! A Core Committer will review your pull request soon. For code contributions, you can learn more about the review process here.

Copy link
Member

@jespino jespino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Thanks @vipul08! 🎉

Copy link
Member

@calebroseland calebroseland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one minor request on extra spaces, but otherwise LGTM!

@@ -111,7 +112,7 @@ export type MessageHistory = {

export type PostsState = {
posts: IDMappedObjects<Post>;
postsReplies: {[x in $ID<Post>]: number};
postsReplies: { [x in $ID<Post>]: number };
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
postsReplies: { [x in $ID<Post>]: number };
postsReplies: {[x in $ID<Post>]: number};

nit: I don't think eslint/tsc checks for this in particular, but the normal convention (mattermost-webapp/redux) is no spaces around inline object notation 1/5

@vipul08
Copy link
Contributor Author

vipul08 commented Oct 22, 2020

@calebroseland - I have made changes as suggested. Kindly review.

Copy link
Member

@calebroseland calebroseland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@calebroseland calebroseland added 4: Reviews Complete All reviewers have approved the pull request and removed 2: Dev Review Requires review by a core commiter 3: QA Review labels Oct 22, 2020
@calebroseland
Copy link
Member

calebroseland commented Oct 22, 2020

Nothing to QA (type-only)
(eventual QA in webapp PR for linked issue)

@calebroseland calebroseland merged commit 8f99a5d into mattermost:master Oct 22, 2020
larkox added a commit that referenced this pull request Jan 12, 2021
* [MM-27556] Add sys console ancillary permissions and ability to exclude roles (#1242)

* Add sys console ancillary permissions and ability to exclude roles

* Update userIsNotAdminOrGuest to only apply to system admin and guest

* MM-28533

* MM-28532

* Rename userAccessTokensForUser to userAccessTokensByUser and fix the type (#1263)

* [MM-28218] Redux hooks for updating company info and address (#1259)

* [MM-28218] Redux hooks for updating company info and address

* Update type to make changed customer parameters optional

* Added user_actual_id to rudder page event (#1264)

* [MM-28214][MM-28216] Redux hooks for getting invoices (#1266)

* [MM-28214][MM-28216] Redux hooks for getting invoices

* Remove selector and add field for last invoice on Subscription

* Make last_invoice optional

* MM-29679 Add memoization to getCustomEmojis (#1260)

* Addition of filenames field in Post Component (#1261)

Co-authored-by: Vipul Kakkar <vipul.kakkar@walmartlabs.com>

* [MM-28214] Additional fields on the invoices (#1271)

* MM-27909: Add shared channel permission (#1246)

Adding the required constant to add the permission

* MM-22845 Fix quick switcher results (#1270)

* MM-22845 Fix quick switcher results
 * Change esiting searchprofiles selector to be searchProfilesStartingWithTerm
 * Add a new selector searchProfileMatchingWithTerm for substring mtaches

* FIx line formatting

* Abstract some filter code

* Change selectors to use memiosation

* improve memoisation

* Add feature flags to the admin config struct. (#1275)

* MM-29998 Add telemetry for in product notices (#1277)

* Add telemetry event notice_seen_NOTICEID

* MM-28833 Remove computed details from getChannel selector (#1257)

* MM-28833 Remove computed details from getChannel selector

* Update tests

* [MM-20481] Add 'link' as a possible PostEmbedType (#1272)

This is needed to finalize PR mattermost/mattermost-webapp#6668
Server corresponding definition https://github.com/mattermost/mattermost-server/blob/a63684fcb5e3ba7b7522b35c29a4cb27779ba823/model/post_embed.go#L10

* [MM-20581] Update method signature for getGroupsAssociatedToChannel (#1281)

* MM-30090 Add ManagedResourcePaths setting (#1282)

* [MM-20581] Change `Groups` constant to `enum` (#1284)

* [MM-20581] Convert all redux constants to const

* Revert "[MM-20581] Convert all redux constants to const"

This reverts commit 5a2b5c3.

* Rework to use enum

* MM-19509 Prioritize autocomplete results based on interactions and threads (#1279)

* MM-19509 Prioritize auto completer results based on interactions and threads

  * Add selector makeGetProfilesForThread for getting profiles for threds
  * Add selector makeAddLastViewAtToProfiles to add last_viewed_at for profiles if
    membership exists

* Update src/selectors/entities/posts.test.js

Co-authored-by: Harrison Healey <harrisonmhealey@gmail.com>

* Change to use a get all channels instead if computed selector

* Capitalise ts def

Co-authored-by: Harrison Healey <harrisonmhealey@gmail.com>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* init commit (#1269)

* Fix ChannelModeration to be consistent with ChannelModerationRoles (#1291)

* add MANAGE_REMOTE_CLUSTERS permission (#1294)

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* DOPS-243 (#1299)

DOPS-243 (#1299)

* [MM-30158] Added method for moving multiple channels from any number of categories to one category. (#1295)

* [MM-30158] Added method for moving multiple channels from any number of categories to one category.

* Some extra test cases

* Fixed typos

* MM-20897 Add category muting (#1286)

* MM-20897 Add setCategoryMuted action

* Add constants for channel notify props

* MM-20897 Mute categories without waiting for websocket events

* Revert unintended change

* [MM-20423]: Update type. (#1298)

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* DOPS-243 (#1301)

DOPS-243 (#1301)

* MM-30087 Remove direct dependency between Client4 and Rudder (#1293)

* [MM-27927] - Add user preference for limit on dms and gms (#1300)

* [MM-27927] - Add user preference for limit on dms and gms

* Fix failing tests

* fix wrong preference naming

* Add tests and fix selector

* Resolve PR comments

* Fix tests

* call limit pref directly

Co-authored-by: Nevyana Angelova <nevyangelova@Nevyanas-MBP-2.fritz.box>
Co-authored-by: Nevyana Angelova <nevyangelova@Nevyanas-MacBook-Pro-2.local>

* [MM-20400] Add IsDefaultMarketplace to ClientConfig (#1304)

* Add IsDefaultMarketplace to ClientConfig

* Add MarketplaceLabel

* Update MarketplacePlugin

* Empty commit

* Correctly mark optional fields

* [MM-30981] Require Plugin name in manifest (#1306)

* editor config trim trailing whitespace (#1307)

* Fix createComplianceReport action parameter type (#1289)

* add fields to config.ts (#1285)

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* Update isomorphic-fetch to 3.0.0 and make it a dev dependency (#1308)

Co-authored-by: Stefan Bley <stefan.bley@zeiss.com>

* Revert "[MM-27927] - Add user preference for limit on dms and gms (#1300)" (#1315)

This reverts commit aa69940.

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* [MM-31053] Optimistically update category order (#1314)

* Update eslint-plugin-mattermost (#1318)

* Update eslint-plugin-mattermost

* Fix cache (#1319)

Co-authored-by: Elisabeth Kulzer <elikul@elikul.de>

* [MM-30982] Add filter metadata to Marketplace response (#1309)

* Add filter metadata to Marketplace response

* Add metadata from mattermost/mattermost-marketplace#145

* [MM-31329] Enable @typescript-eslint/array-type (#1320)

* Add `message_source` field to `Post` type (#1321)

* add new anciliary permissions (#1325)

* MM-30443 Add shouldShowUnreadsCategory selector for new sidebar (#1326)

* Fix lint

Co-authored-by: Farhan Munshi <farhanmmunshi@gmail.com>
Co-authored-by: Devin Binnie <52460000+devinbinnie@users.noreply.github.com>
Co-authored-by: Maria A Nunez <maria.nunez@mattermost.com>
Co-authored-by: Harrison Healey <harrisonmhealey@gmail.com>
Co-authored-by: Vipul Kakkar <vipul.kakkar9@gmail.com>
Co-authored-by: Vipul Kakkar <vipul.kakkar@walmartlabs.com>
Co-authored-by: Agniva De Sarker <agnivade@yahoo.co.in>
Co-authored-by: Sudheer <sudheer.105@gmail.com>
Co-authored-by: Christopher Speller <crspeller@gmail.com>
Co-authored-by: Nicolas Le Cam <niko.lecam@gmail.com>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Hossein Ahmadian-Yazdi <hahmadia@users.noreply.github.com>
Co-authored-by: Clément Collin <cinlloc@gmail.com>
Co-authored-by: Ibrahim Serdar Acikgoz <serdaracikgoz86@gmail.com>
Co-authored-by: Elisabeth Kulzer <elikul@elikul.de>
Co-authored-by: dizkek <41262168+dizkek@users.noreply.github.com>
Co-authored-by: Nev Angelova <nevy.angelova@gmail.com>
Co-authored-by: Nevyana Angelova <nevyangelova@Nevyanas-MBP-2.fritz.box>
Co-authored-by: Nevyana Angelova <nevyangelova@Nevyanas-MacBook-Pro-2.local>
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
Co-authored-by: Caleb Roseland <caleb.roseland@mattermost.com>
Co-authored-by: Daniel Shuy <daniel_shuy@hotmail.com>
Co-authored-by: Scott Bishel <scott.bishel@mattermost.com>
Co-authored-by: Stefan Bley <stefan.bley.dd@gmx.de>
Co-authored-by: Stefan Bley <stefan.bley@zeiss.com>
Co-authored-by: Guillermo Vayá <guillermo.vaya@mattermost.com>
hmhealey added a commit that referenced this pull request Mar 18, 2021
* Locations (#1258)

* Add support to plugin integrations the same way as mobile

* Add selector

* Filter integrations by location

* First approach to apps

* Fix location url

* Remove locations on 404

* Revert "Remove locations on 404"

This reverts commit 9bb01f9.

* Fix lint

* Address feedback, adapt to new calls prs and renaming

* Improve variable name

* Refactor

* Update with webapp PR requests

* add constant

* Fix lint and reference error

Co-authored-by: Michael Kochell <6913320+mickmister@users.noreply.github.com>

* Updated apps types to reflect server changes (#1287)

* Updated apps types to reflect server changes

* fixed getAppBindings to return the children

* remove exclamation point

* updates for app modals (#1292)

Co-authored-by: Michael Kochell <6913320+mickmister@users.noreply.github.com>

* Some fixes to sync with lev-clenaup branch on apps (#1297)

* description should be optional (#1302)

* updates for app commands (#1303)

change import order

* Merge master into feature cloud-apps branch (#1328)

* [MM-27556] Add sys console ancillary permissions and ability to exclude roles (#1242)

* Add sys console ancillary permissions and ability to exclude roles

* Update userIsNotAdminOrGuest to only apply to system admin and guest

* MM-28533

* MM-28532

* Rename userAccessTokensForUser to userAccessTokensByUser and fix the type (#1263)

* [MM-28218] Redux hooks for updating company info and address (#1259)

* [MM-28218] Redux hooks for updating company info and address

* Update type to make changed customer parameters optional

* Added user_actual_id to rudder page event (#1264)

* [MM-28214][MM-28216] Redux hooks for getting invoices (#1266)

* [MM-28214][MM-28216] Redux hooks for getting invoices

* Remove selector and add field for last invoice on Subscription

* Make last_invoice optional

* MM-29679 Add memoization to getCustomEmojis (#1260)

* Addition of filenames field in Post Component (#1261)

Co-authored-by: Vipul Kakkar <vipul.kakkar@walmartlabs.com>

* [MM-28214] Additional fields on the invoices (#1271)

* MM-27909: Add shared channel permission (#1246)

Adding the required constant to add the permission

* MM-22845 Fix quick switcher results (#1270)

* MM-22845 Fix quick switcher results
 * Change esiting searchprofiles selector to be searchProfilesStartingWithTerm
 * Add a new selector searchProfileMatchingWithTerm for substring mtaches

* FIx line formatting

* Abstract some filter code

* Change selectors to use memiosation

* improve memoisation

* Add feature flags to the admin config struct. (#1275)

* MM-29998 Add telemetry for in product notices (#1277)

* Add telemetry event notice_seen_NOTICEID

* MM-28833 Remove computed details from getChannel selector (#1257)

* MM-28833 Remove computed details from getChannel selector

* Update tests

* [MM-20481] Add 'link' as a possible PostEmbedType (#1272)

This is needed to finalize PR mattermost/mattermost-webapp#6668
Server corresponding definition https://github.com/mattermost/mattermost-server/blob/a63684fcb5e3ba7b7522b35c29a4cb27779ba823/model/post_embed.go#L10

* [MM-20581] Update method signature for getGroupsAssociatedToChannel (#1281)

* MM-30090 Add ManagedResourcePaths setting (#1282)

* [MM-20581] Change `Groups` constant to `enum` (#1284)

* [MM-20581] Convert all redux constants to const

* Revert "[MM-20581] Convert all redux constants to const"

This reverts commit 5a2b5c3.

* Rework to use enum

* MM-19509 Prioritize autocomplete results based on interactions and threads (#1279)

* MM-19509 Prioritize auto completer results based on interactions and threads

  * Add selector makeGetProfilesForThread for getting profiles for threds
  * Add selector makeAddLastViewAtToProfiles to add last_viewed_at for profiles if
    membership exists

* Update src/selectors/entities/posts.test.js

Co-authored-by: Harrison Healey <harrisonmhealey@gmail.com>

* Change to use a get all channels instead if computed selector

* Capitalise ts def

Co-authored-by: Harrison Healey <harrisonmhealey@gmail.com>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* init commit (#1269)

* Fix ChannelModeration to be consistent with ChannelModerationRoles (#1291)

* add MANAGE_REMOTE_CLUSTERS permission (#1294)

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* DOPS-243 (#1299)

DOPS-243 (#1299)

* [MM-30158] Added method for moving multiple channels from any number of categories to one category. (#1295)

* [MM-30158] Added method for moving multiple channels from any number of categories to one category.

* Some extra test cases

* Fixed typos

* MM-20897 Add category muting (#1286)

* MM-20897 Add setCategoryMuted action

* Add constants for channel notify props

* MM-20897 Mute categories without waiting for websocket events

* Revert unintended change

* [MM-20423]: Update type. (#1298)

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* DOPS-243 (#1301)

DOPS-243 (#1301)

* MM-30087 Remove direct dependency between Client4 and Rudder (#1293)

* [MM-27927] - Add user preference for limit on dms and gms (#1300)

* [MM-27927] - Add user preference for limit on dms and gms

* Fix failing tests

* fix wrong preference naming

* Add tests and fix selector

* Resolve PR comments

* Fix tests

* call limit pref directly

Co-authored-by: Nevyana Angelova <nevyangelova@Nevyanas-MBP-2.fritz.box>
Co-authored-by: Nevyana Angelova <nevyangelova@Nevyanas-MacBook-Pro-2.local>

* [MM-20400] Add IsDefaultMarketplace to ClientConfig (#1304)

* Add IsDefaultMarketplace to ClientConfig

* Add MarketplaceLabel

* Update MarketplacePlugin

* Empty commit

* Correctly mark optional fields

* [MM-30981] Require Plugin name in manifest (#1306)

* editor config trim trailing whitespace (#1307)

* Fix createComplianceReport action parameter type (#1289)

* add fields to config.ts (#1285)

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* Update isomorphic-fetch to 3.0.0 and make it a dev dependency (#1308)

Co-authored-by: Stefan Bley <stefan.bley@zeiss.com>

* Revert "[MM-27927] - Add user preference for limit on dms and gms (#1300)" (#1315)

This reverts commit aa69940.

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* [MM-31053] Optimistically update category order (#1314)

* Update eslint-plugin-mattermost (#1318)

* Update eslint-plugin-mattermost

* Fix cache (#1319)

Co-authored-by: Elisabeth Kulzer <elikul@elikul.de>

* [MM-30982] Add filter metadata to Marketplace response (#1309)

* Add filter metadata to Marketplace response

* Add metadata from mattermost/mattermost-marketplace#145

* [MM-31329] Enable @typescript-eslint/array-type (#1320)

* Add `message_source` field to `Post` type (#1321)

* add new anciliary permissions (#1325)

* MM-30443 Add shouldShowUnreadsCategory selector for new sidebar (#1326)

* Fix lint

Co-authored-by: Farhan Munshi <farhanmmunshi@gmail.com>
Co-authored-by: Devin Binnie <52460000+devinbinnie@users.noreply.github.com>
Co-authored-by: Maria A Nunez <maria.nunez@mattermost.com>
Co-authored-by: Harrison Healey <harrisonmhealey@gmail.com>
Co-authored-by: Vipul Kakkar <vipul.kakkar9@gmail.com>
Co-authored-by: Vipul Kakkar <vipul.kakkar@walmartlabs.com>
Co-authored-by: Agniva De Sarker <agnivade@yahoo.co.in>
Co-authored-by: Sudheer <sudheer.105@gmail.com>
Co-authored-by: Christopher Speller <crspeller@gmail.com>
Co-authored-by: Nicolas Le Cam <niko.lecam@gmail.com>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Hossein Ahmadian-Yazdi <hahmadia@users.noreply.github.com>
Co-authored-by: Clément Collin <cinlloc@gmail.com>
Co-authored-by: Ibrahim Serdar Acikgoz <serdaracikgoz86@gmail.com>
Co-authored-by: Elisabeth Kulzer <elikul@elikul.de>
Co-authored-by: dizkek <41262168+dizkek@users.noreply.github.com>
Co-authored-by: Nev Angelova <nevy.angelova@gmail.com>
Co-authored-by: Nevyana Angelova <nevyangelova@Nevyanas-MBP-2.fritz.box>
Co-authored-by: Nevyana Angelova <nevyangelova@Nevyanas-MacBook-Pro-2.local>
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
Co-authored-by: Caleb Roseland <caleb.roseland@mattermost.com>
Co-authored-by: Daniel Shuy <daniel_shuy@hotmail.com>
Co-authored-by: Scott Bishel <scott.bishel@mattermost.com>
Co-authored-by: Stefan Bley <stefan.bley.dd@gmx.de>
Co-authored-by: Stefan Bley <stefan.bley@zeiss.com>
Co-authored-by: Guillermo Vayá <guillermo.vaya@mattermost.com>

* update types for dynamic modals (#1322)

* update types for dynamic modals

* Add AppFormValue and AppFormValues

* add fields to support opening modals and refreshing

* move presentation field from call to binding

* remove source_url, and make select value be an object instead of string

* add binding presentation

* add makeLookupCallPayload()

* remove presentation, rename type

* remove unused imports

* correct and update expand levels (#1341)

* [MM-32476] Apps in the Marketplace (#1352)

* Fix linter errors on feature/cloud-apps (#1371)

* Fix linter errors on feature/cloud-apps

* Include feedback

* [MM-31508] Rename URL to Path in Call (#1370)

* Add User Agent to call context (#1379)

* Add warning into code about using apps related code (#1380)

* Add warning into code about using apps related code

* Improve wording

* Change user agent property in get bindings query (#1388)

* [MM-33511] Apps might not have a RootURL (#1394)

* Change call type submit and call response ok to not be empty strings (#1391)

* Add binding validation on fetch bindings (#1381)

* Add binding validation on fetch bindings

* Fix lint

* Add documentation and rename fillandtrim

* Use call type on the path (#1406)

Co-authored-by: Michael Kochell <6913320+mickmister@users.noreply.github.com>

* Temporarily re-add types that were moved or renamed

Co-authored-by: Daniel Espino García <larkox@gmail.com>
Co-authored-by: Michael Kochell <6913320+mickmister@users.noreply.github.com>
Co-authored-by: Lev <1187448+levb@users.noreply.github.com>
Co-authored-by: Jason Frerich <jason.frerich@mattermost.com>
Co-authored-by: Farhan Munshi <farhanmmunshi@gmail.com>
Co-authored-by: Devin Binnie <52460000+devinbinnie@users.noreply.github.com>
Co-authored-by: Maria A Nunez <maria.nunez@mattermost.com>
Co-authored-by: Vipul Kakkar <vipul.kakkar9@gmail.com>
Co-authored-by: Vipul Kakkar <vipul.kakkar@walmartlabs.com>
Co-authored-by: Agniva De Sarker <agnivade@yahoo.co.in>
Co-authored-by: Sudheer <sudheer.105@gmail.com>
Co-authored-by: Christopher Speller <crspeller@gmail.com>
Co-authored-by: Nicolas Le Cam <niko.lecam@gmail.com>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Hossein Ahmadian-Yazdi <hahmadia@users.noreply.github.com>
Co-authored-by: Clément Collin <cinlloc@gmail.com>
Co-authored-by: Ibrahim Serdar Acikgoz <serdaracikgoz86@gmail.com>
Co-authored-by: Elisabeth Kulzer <elikul@elikul.de>
Co-authored-by: dizkek <41262168+dizkek@users.noreply.github.com>
Co-authored-by: Nev Angelova <nevy.angelova@gmail.com>
Co-authored-by: Nevyana Angelova <nevyangelova@Nevyanas-MBP-2.fritz.box>
Co-authored-by: Nevyana Angelova <nevyangelova@Nevyanas-MacBook-Pro-2.local>
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
Co-authored-by: Caleb Roseland <caleb.roseland@mattermost.com>
Co-authored-by: Daniel Shuy <daniel_shuy@hotmail.com>
Co-authored-by: Scott Bishel <scott.bishel@mattermost.com>
Co-authored-by: Stefan Bley <stefan.bley.dd@gmx.de>
Co-authored-by: Stefan Bley <stefan.bley@zeiss.com>
Co-authored-by: Guillermo Vayá <guillermo.vaya@mattermost.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
4: Reviews Complete All reviewers have approved the pull request Hacktoberfest null hacktoberfest-accepted null
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants