Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ describe('SupportSettings', () => {
[
{text: 'Ask the community', link: SupportSettings.ASK_COMMUNITY_LINK},
{text: 'Mattermost user guide', link: SupportSettings.MATTERMOST_USER_GUIDE},
{text: 'Report a problem', link: SupportSettings.REPORT_A_PROBLEM_LINK},
{text: 'Report a problem', link: 'mailto:reportaproblem@mattermost.com'},
{text: 'Keyboard shortcuts'},
].forEach(({text, link}) => {
if (link) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ describe('Customization', () => {
});

it('MM-T1214 - Can change Report a Problem Link setting', () => {
// * Verify Report a Problem link label is visible and matches the text
cy.findByTestId('SupportSettings.ReportAProblemLinklabel').scrollIntoView().should('be.visible').and('have.text', 'Report a Problem Link:');
// # Select 'Custom link' from the Report a Problem dropdown
cy.findByTestId('SupportSettings.ReportAProblemTypedropdown').scrollIntoView().select('Custom link');

// * Verify Report a Problem link input box has default value. The default value depends on the setup before running the test.
cy.findByTestId('SupportSettings.ReportAProblemLinkinput').should('have.value', origConfig.SupportSettings.ReportAProblemLink);
// * Verify Report a Problem link label is visible and matches the text
cy.findByTestId('SupportSettings.ReportAProblemLinklabel').scrollIntoView().should('be.visible').and('have.text', 'Custom Report a Problem Link:');

// * Verify Report a Problem link help text is visible and matches the text
cy.findByTestId('SupportSettings.ReportAProblemLinkhelp-text').find('span').should('be.visible').and('have.text', 'The URL for the Report a Problem link in the Help Menu. If this field is empty, the link is removed from the Help Menu.');
cy.findByTestId('SupportSettings.ReportAProblemLinkhelp-text').find('span').should('be.visible').and('have.text', 'Enter the URL that users will be directed to when they choose "Report a Problem".');

// # Enter a problem link
const reportAProblemLink = 'https://mattermost.com/pl/report-a-bug';
Expand Down
2 changes: 0 additions & 2 deletions e2e-tests/cypress/tests/utils/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ export const ABOUT_LINK = 'https://mattermost.com/pl/about-mattermost';
export const ASK_COMMUNITY_LINK = 'https://mattermost.com/pl/default-ask-mattermost-community/';
export const HELP_LINK = 'https://mattermost.com/pl/help/';
export const PRIVACY_POLICY_LINK = 'https://mattermost.com/pl/privacy-policy/';
export const REPORT_A_PROBLEM_LINK = 'https://mattermost.com/pl/report-a-bug';
export const TERMS_OF_SERVICE_LINK = 'https://mattermost.com/pl/terms-of-use/';
export const MATTERMOST_USER_GUIDE = 'https://docs.mattermost.com/guides/use-mattermost.html';

Expand All @@ -24,7 +23,6 @@ export const SupportSettings = {
ASK_COMMUNITY_LINK,
HELP_LINK,
PRIVACY_POLICY_LINK,
REPORT_A_PROBLEM_LINK,
TERMS_OF_SERVICE_LINK,
MATTERMOST_USER_GUIDE,
};
Expand Down
2 changes: 1 addition & 1 deletion server/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ TEMPLATES_DIR=templates

# Plugins Packages
PLUGIN_PACKAGES ?= $(PLUGIN_PACKAGES:)
PLUGIN_PACKAGES += mattermost-plugin-calls-v1.11.4
PLUGIN_PACKAGES += mattermost-plugin-calls-v1.11.5
PLUGIN_PACKAGES += mattermost-plugin-github-v2.7.1
PLUGIN_PACKAGES += mattermost-plugin-gitlab-v1.12.2
PLUGIN_PACKAGES += mattermost-plugin-jira-v4.7.0
Expand Down
8 changes: 4 additions & 4 deletions server/channels/store/sqlstore/access_control_policy_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ func (s *SqlAccessControlPolicyStore) Save(rctx request.CTX, policy *model.Acces
return nil, err
}

tx, err := s.GetMaster().Beginx()
tx, err := s.GetMaster().Begin()
if err != nil {
return nil, errors.Wrap(err, "failed to start transaction")
}
Expand Down Expand Up @@ -303,7 +303,7 @@ func (s *SqlAccessControlPolicyStore) Save(rctx request.CTX, policy *model.Acces
}

func (s *SqlAccessControlPolicyStore) Delete(rctx request.CTX, id string) error {
tx, err := s.GetMaster().Beginx()
tx, err := s.GetMaster().Begin()
if err != nil {
return errors.Wrap(err, "failed to start transaction")
}
Expand Down Expand Up @@ -360,7 +360,7 @@ func (s *SqlAccessControlPolicyStore) deleteT(_ request.CTX, tx *sqlxTxWrapper,
}

func (s *SqlAccessControlPolicyStore) SetActiveStatus(rctx request.CTX, id string, active bool) (*model.AccessControlPolicy, error) {
tx, err := s.GetMaster().Beginx()
tx, err := s.GetMaster().Begin()
if err != nil {
return nil, errors.Wrap(err, "failed to start transaction")
}
Expand Down Expand Up @@ -410,7 +410,7 @@ func (s *SqlAccessControlPolicyStore) SetActiveStatus(rctx request.CTX, id strin
}

func (s *SqlAccessControlPolicyStore) SetActiveStatusMultiple(rctx request.CTX, list []model.AccessControlPolicyActiveUpdate) ([]*model.AccessControlPolicy, error) {
tx, err := s.GetMaster().Beginx()
tx, err := s.GetMaster().Begin()
if err != nil {
return nil, errors.Wrap(err, "failed to start transaction")
}
Expand Down
5 changes: 1 addition & 4 deletions server/channels/store/sqlstore/attributes_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,7 @@ func (s *SqlAttributesStore) GetSubject(rctx request.CTX, ID, groupID string) (*
return nil, errors.Wrap(err, "failed to build query for subject")
}

row := s.GetReplica().QueryRowxContext(rctx.Context(), q, args...)
if err := row.Err(); err != nil {
return nil, errors.Wrap(err, "failed to get subject")
}
row := s.GetReplica().QueryRowContext(rctx.Context(), q, args...)

var subject model.Subject
var properties []byte
Expand Down
6 changes: 3 additions & 3 deletions server/channels/store/sqlstore/channel_bookmark_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ func (s *SqlChannelBookmarkStore) Save(bookmark *model.ChannelBookmark, increase
return nil, err
}

transaction, err := s.GetMaster().Beginx()
transaction, err := s.GetMaster().Begin()
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -234,7 +234,7 @@ func (s *SqlChannelBookmarkStore) Update(bookmark *model.ChannelBookmark) error

func (s *SqlChannelBookmarkStore) UpdateSortOrder(bookmarkId, channelId string, newIndex int64) ([]*model.ChannelBookmarkWithFileInfo, error) {
now := model.GetMillis()
transaction, err := s.GetMaster().Beginx()
transaction, err := s.GetMaster().Begin()
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -294,7 +294,7 @@ func (s *SqlChannelBookmarkStore) UpdateSortOrder(bookmarkId, channelId string,

func (s *SqlChannelBookmarkStore) Delete(bookmarkId string, deleteFile bool) error {
now := model.GetMillis()
transaction, err := s.GetMaster().Beginx()
transaction, err := s.GetMaster().Begin()
if err != nil {
return err
}
Expand Down
34 changes: 17 additions & 17 deletions server/channels/store/sqlstore/channel_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ func (s SqlChannelStore) Save(rctx request.CTX, channel *model.Channel, maxChann
}

var newChannel *model.Channel
transaction, err := s.GetMaster().Beginx()
transaction, err := s.GetMaster().Begin()
if err != nil {
return nil, errors.Wrap(err, "begin_transaction")
}
Expand Down Expand Up @@ -694,7 +694,7 @@ func (s SqlChannelStore) SaveDirectChannel(rctx request.CTX, directChannel *mode
return nil, store.NewErrInvalidInput("Channel", "Type", directChannel.Type)
}

transaction, err := s.GetMaster().Beginx()
transaction, err := s.GetMaster().Begin()
if err != nil {
return nil, errors.Wrap(err, "begin_transaction")
}
Expand Down Expand Up @@ -737,7 +737,7 @@ func (s SqlChannelStore) SaveBoardChannel(rctx request.CTX, channel *model.Chann
return nil, nil, store.NewErrInvalidInput("View", "nil", "view is required for board channels")
}

transaction, err := s.GetMaster().Beginx()
transaction, err := s.GetMaster().Begin()
if err != nil {
return nil, nil, errors.Wrap(err, "begin_transaction")
}
Expand Down Expand Up @@ -818,7 +818,7 @@ func (s SqlChannelStore) saveChannelT(transaction *sqlxTxWrapper, channel *model

// Update writes the updated channel to the database.
func (s SqlChannelStore) Update(rctx request.CTX, channel *model.Channel) (_ *model.Channel, err error) {
transaction, err := s.GetMaster().Beginx()
transaction, err := s.GetMaster().Begin()
if err != nil {
return nil, errors.Wrap(err, "begin_transaction")
}
Expand Down Expand Up @@ -1033,7 +1033,7 @@ func (s SqlChannelStore) Restore(channelId string, time int64) error {
func (s SqlChannelStore) SetDeleteAt(channelId string, deleteAt, updateAt int64) (err error) {
defer s.InvalidateChannel(channelId)

transaction, err := s.GetMaster().Beginx()
transaction, err := s.GetMaster().Begin()
if err != nil {
return errors.Wrap(err, "SetDeleteAt: begin_transaction")
}
Expand Down Expand Up @@ -1077,7 +1077,7 @@ func (s SqlChannelStore) setDeleteAtT(transaction *sqlxTxWrapper, channelId stri

// PermanentDeleteByTeam removes all channels for the given team from the database.
func (s SqlChannelStore) PermanentDeleteByTeam(teamId string) (err error) {
transaction, err := s.GetMaster().Beginx()
transaction, err := s.GetMaster().Begin()
if err != nil {
return errors.Wrap(err, "PermanentDeleteByTeam: begin_transaction")
}
Expand Down Expand Up @@ -1114,7 +1114,7 @@ func (s SqlChannelStore) permanentDeleteByTeamtT(transaction *sqlxTxWrapper, tea

// PermanentDelete removes the given channel from the database.
func (s SqlChannelStore) PermanentDelete(rctx request.CTX, channelId string) (err error) {
transaction, err := s.GetMaster().Beginx()
transaction, err := s.GetMaster().Begin()
if err != nil {
return errors.Wrap(err, "PermanentDelete: begin_transaction")
}
Expand Down Expand Up @@ -1841,7 +1841,7 @@ func (s SqlChannelStore) saveMultipleMembers(members []*model.ChannelMember) (_
defaultTeamRolesByChannel[defaultRoles.Id] = defaultRoles
}

transaction, err := s.GetMaster().Beginx()
transaction, err := s.GetMaster().Begin()
if err != nil {
return nil, errors.Wrap(err, "begin_transaction")
}
Expand Down Expand Up @@ -1909,7 +1909,7 @@ func (s SqlChannelStore) UpdateMultipleMembers(members []*model.ChannelMember) (

var transaction *sqlxTxWrapper

if transaction, err = s.GetMaster().Beginx(); err != nil {
if transaction, err = s.GetMaster().Begin(); err != nil {
return nil, errors.Wrap(err, "begin_transaction")
}
defer finalizeTransactionX(transaction, &err)
Expand Down Expand Up @@ -1968,7 +1968,7 @@ func (s SqlChannelStore) UpdateMember(rctx request.CTX, member *model.ChannelMem
}

func (s SqlChannelStore) UpdateMemberNotifyProps(channelID, userID string, props map[string]string) (_ *model.ChannelMember, err error) {
tx, err := s.GetMaster().Beginx()
tx, err := s.GetMaster().Begin()
if err != nil {
return nil, errors.Wrap(err, "begin_transaction")
}
Expand Down Expand Up @@ -2051,7 +2051,7 @@ func (s SqlChannelStore) PatchMultipleMembersNotifyProps(members []*model.Channe
Set("LastUpdateAt", model.GetMillis()).
Where(whereClause)

transaction, err := s.GetMaster().Beginx()
transaction, err := s.GetMaster().Begin()
if err != nil {
return nil, errors.Wrap(err, "begin_transaction")
}
Expand Down Expand Up @@ -2462,7 +2462,7 @@ func (s SqlChannelStore) GetAllChannelMembersForUser(rctx request.CTX, userId st
}
defer deferClose(rows, &err)

scanner := func(rows *sql.Rows) (string, string, error) {
scanner := func(rows rowScanner) (string, string, error) {
var cm allChannelMember
err = rows.Scan(
&cm.ChannelId, &cm.Roles, &cm.SchemeGuest, &cm.SchemeUser,
Expand Down Expand Up @@ -2504,7 +2504,7 @@ func (s SqlChannelStore) GetChannelsMemberCount(channelIDs []string) (_ map[stri
defaults[channelID] = 0
}

scanner := func(rows *sql.Rows) (string, int64, error) {
scanner := func(rows rowScanner) (string, int64, error) {
var channelID string
var count int64
err := rows.Scan(&channelID, &count)
Expand Down Expand Up @@ -3153,7 +3153,7 @@ func (s SqlChannelStore) AnalyticsCountAll(teamId string) (map[model.ChannelType
}
defer rows.Close()

scanner := func(rows *sql.Rows) (model.ChannelType, int64, error) {
scanner := func(rows rowScanner) (model.ChannelType, int64, error) {
var channelType model.ChannelType
var count int64
err := rows.Scan(&channelType, &count)
Expand Down Expand Up @@ -3970,7 +3970,7 @@ func (s SqlChannelStore) GetChannelsByScheme(schemeId string, offset int, limit
func (s SqlChannelStore) MigrateChannelMembers(fromChannelId string, fromUserId string) (_ map[string]string, err error) {
var transaction *sqlxTxWrapper

if transaction, err = s.GetMaster().Beginx(); err != nil {
if transaction, err = s.GetMaster().Begin(); err != nil {
return nil, errors.Wrap(err, "begin_transaction")
}
defer finalizeTransactionX(transaction, &err)
Expand Down Expand Up @@ -4064,7 +4064,7 @@ func (s SqlChannelStore) MigrateChannelMembers(fromChannelId string, fromUserId
}

func (s SqlChannelStore) ResetAllChannelSchemes() (err error) {
transaction, err := s.GetMaster().Beginx()
transaction, err := s.GetMaster().Begin()
if err != nil {
return errors.Wrap(err, "begin_transaction")
}
Expand Down Expand Up @@ -4098,7 +4098,7 @@ func (s SqlChannelStore) ClearAllCustomRoleAssignments() (err error) {
for {
var transaction *sqlxTxWrapper

if transaction, err = s.GetMaster().Beginx(); err != nil {
if transaction, err = s.GetMaster().Begin(); err != nil {
return errors.Wrap(err, "begin_transaction")
}

Expand Down
16 changes: 8 additions & 8 deletions server/channels/store/sqlstore/channel_store_categories.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
)

func (s SqlChannelStore) CreateInitialSidebarCategories(rctx request.CTX, userId string, teamID string) (_ *model.OrderedSidebarCategories, err error) {
transaction, err := s.GetMaster().Beginx()
transaction, err := s.GetMaster().Begin()
if err != nil {
return nil, errors.Wrap(err, "CreateInitialSidebarCategories: begin_transaction")
}
Expand Down Expand Up @@ -183,7 +183,7 @@ func (s SqlChannelStore) migrateFavoritesToSidebarT(transaction *sqlxTxWrapper,
// MigrateFavoritesToSidebarChannels populates the SidebarChannels table by analyzing existing user preferences for favorites
// **IMPORTANT** This function should only be called from the migration task and shouldn't be used by itself
func (s SqlChannelStore) MigrateFavoritesToSidebarChannels(lastUserId string, runningOrder int64) (_ map[string]any, err error) {
transaction, err := s.GetMaster().Beginx()
transaction, err := s.GetMaster().Begin()
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -230,7 +230,7 @@ type sidebarCategoryForJoin struct {
}

func (s SqlChannelStore) CreateSidebarCategory(userId, teamId string, newCategory *model.SidebarCategoryWithChannels) (_ *model.SidebarCategoryWithChannels, err error) {
transaction, err := s.GetMaster().Beginx()
transaction, err := s.GetMaster().Begin()
if err != nil {
return nil, errors.Wrap(err, "begin_transaction")
}
Expand Down Expand Up @@ -590,7 +590,7 @@ func (s SqlChannelStore) updateSidebarCategoryOrderT(transaction *sqlxTxWrapper,
}

func (s SqlChannelStore) UpdateSidebarCategoryOrder(userId, teamId string, categoryOrder []string) (err error) {
transaction, err := s.GetMaster().Beginx()
transaction, err := s.GetMaster().Begin()
if err != nil {
return errors.Wrap(err, "begin_transaction")
}
Expand Down Expand Up @@ -627,7 +627,7 @@ func (s SqlChannelStore) UpdateSidebarCategoryOrder(userId, teamId string, categ

//nolint:unparam
func (s SqlChannelStore) UpdateSidebarCategories(userId, teamId string, categories []*model.SidebarCategoryWithChannels) (updated []*model.SidebarCategoryWithChannels, original []*model.SidebarCategoryWithChannels, err error) {
transaction, err := s.GetMaster().Beginx()
transaction, err := s.GetMaster().Begin()
if err != nil {
return nil, nil, errors.Wrap(err, "begin_transaction")
}
Expand Down Expand Up @@ -820,7 +820,7 @@ func (s SqlChannelStore) UpdateSidebarCategories(userId, teamId string, categori
// UpdateSidebarChannelsByPreferences is called when the Preference table is being updated to keep SidebarCategories in sync
// At the moment, it's only handling Favorites and NOT DMs/GMs (those will be handled client side)
func (s SqlChannelStore) UpdateSidebarChannelsByPreferences(preferences model.Preferences) (err error) {
transaction, err := s.GetMaster().Beginx()
transaction, err := s.GetMaster().Begin()
if err != nil {
return errors.Wrap(err, "UpdateSidebarChannelsByPreferences: begin_transaction")
}
Expand Down Expand Up @@ -951,7 +951,7 @@ func (s SqlChannelStore) addChannelToFavoritesCategoryT(transaction *sqlxTxWrapp
// DeleteSidebarChannelsByPreferences is called when the Preference table is being updated to keep SidebarCategories in sync
// At the moment, it's only handling Favorites and NOT DMs/GMs (those will be handled client side)
func (s SqlChannelStore) DeleteSidebarChannelsByPreferences(preferences model.Preferences) (err error) {
transaction, err := s.GetMaster().Beginx()
transaction, err := s.GetMaster().Begin()
if err != nil {
return errors.Wrap(err, "DeleteSidebarChannelsByPreferences: begin_transaction")
}
Expand Down Expand Up @@ -1011,7 +1011,7 @@ func (s SqlChannelStore) ClearSidebarOnTeamLeave(userId, teamId string) error {
// DeleteSidebarCategory removes a custom category and moves any channels into it into the Channels and Direct Messages
// categories respectively. Assumes that the provided user ID and team ID match the given category ID.
func (s SqlChannelStore) DeleteSidebarCategory(categoryId string) (err error) {
transaction, err := s.GetMaster().Beginx()
transaction, err := s.GetMaster().Begin()
if err != nil {
return errors.Wrap(err, "begin_transaction")
}
Expand Down
2 changes: 1 addition & 1 deletion server/channels/store/sqlstore/content_flagging_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ func newContentFlaggingStore(sqlStore *SqlStore) *SqlContentFlaggingStore {
}

func (s *SqlContentFlaggingStore) SaveReviewerSettings(reviewerSettings model.ReviewerIDsSettings) error {
tx, err := s.GetMaster().Beginx()
tx, err := s.GetMaster().Begin()
if err != nil {
return errors.Wrap(err, "SqlContentFlaggingStore.SaveReviewerSettings failed to begin transaction")
}
Expand Down
4 changes: 2 additions & 2 deletions server/channels/store/sqlstore/group_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ func (s *SqlGroupStore) CreateWithUserIds(g *model.GroupWithUserIds) (_ *model.G
return nil, err
}

txn, err := s.GetMaster().Beginx()
txn, err := s.GetMaster().Begin()
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -1952,7 +1952,7 @@ func (s *SqlGroupStore) UpsertMembers(groupID string, userIDs []string) (_ []*mo
return members, nil
}

transaction, err := s.GetMaster().Beginx()
transaction, err := s.GetMaster().Begin()
if err != nil {
return nil, errors.Wrap(err, "begin_transaction")
}
Expand Down
2 changes: 1 addition & 1 deletion server/channels/store/sqlstore/job_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ func (jss SqlJobStore) SaveOnce(job *model.Job) (*model.Job, error) {
jsonData = AppendBinaryFlag(jsonData)
}

tx, err := jss.GetMaster().BeginXWithIsolation(&sql.TxOptions{
tx, err := jss.GetMaster().BeginWithIsolation(&sql.TxOptions{
Isolation: sql.LevelSerializable,
})
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion server/channels/store/sqlstore/oauth_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ func (as SqlOAuthStore) GetAuthorizedApps(userId string, offset, limit int) ([]*

func (as SqlOAuthStore) DeleteApp(id string) (err error) {
// wrap in a transaction so that if one fails, everything fails
transaction, err := as.GetMaster().Beginx()
transaction, err := as.GetMaster().Begin()
if err != nil {
return errors.Wrap(err, "begin_transaction")
}
Expand Down
Loading
Loading