Commit graph

24 commits

Author SHA1 Message Date
Julien Tant
78050bb0d3
Change properties search signature to support multiple TargetIDs (#33873)
* change properties search

* add tests

* Fix calls to to the search methods

* Fix SearchPropertyFields call with wrong signature
2025-09-11 22:56:01 +00:00
Guillermo Vayá
d15b933888
[MM-64683] Implement property field counting functionality in Plugin API (#33438)
* Implement property field limit enforcement and counting functionality in Plugin API

- Added a limit of 20 property fields per group in the CreatePropertyField method.
- Introduced CountPropertyFields method to count active and all property fields, including deleted ones.
- Enhanced tests to validate the new property field limit and counting behavior.
- Updated related API and service methods to support the new functionality.

* Update server/channels/app/properties/property_field.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix vet

* fix lint error

* fix test

* fix tests

* fix test

* count properties + targets

* Update server/channels/app/plugin_api.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* remove test for limit

* fix more tests

* improve testing messages now that the limit is removed

* Apply suggestion from @calebroseland

Co-authored-by: Caleb Roseland <caleb@calebroseland.com>

* Apply suggestion from @calebroseland

Co-authored-by: Caleb Roseland <caleb@calebroseland.com>

* Apply suggestion from @calebroseland

Co-authored-by: Caleb Roseland <caleb@calebroseland.com>

* Apply suggestion from @calebroseland

Co-authored-by: Caleb Roseland <caleb@calebroseland.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Julien Tant <785518+JulienTant@users.noreply.github.com>
Co-authored-by: Caleb Roseland <caleb@calebroseland.com>
2025-09-11 12:49:14 -07:00
Devin Binnie
770bf64557
[MM-56322] Document GetUsers plugin API limitation (#33542) 2025-07-23 15:18:06 -04:00
David Krauser
aaa62a40ae
[MM-64686] Expose audit logging functionality via plugin API (#31204)
This commit exposes audit logging functionality to plugins via the plugin API, allowing plugins to create and log audit records. Additionally, it addresses a gob encoding issue that could cause plugin crashes when audit data contains nil pointers or unregistered types.
2025-06-25 20:37:32 -04:00
Julien Tant
731bd7c414
MM-63285: Add property field methods to plugin API (#31035)
Co-authored-by: Claude <noreply@anthropic.com>
2025-06-10 16:10:28 -07:00
Ben Cooke
bfe90c3704
New pluginapi method for syncables (#30790)
* new pluginapi method for syncables
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
2025-05-21 14:44:34 -04:00
Ben Cooke
ccd8a60168
Plugin groups (#30320)
* add new pluginapi methods

* SAML login hook

* set ReAddRemovedMembers to true for plugin groups

* change to DoLogin signature for SAML
2025-03-13 12:00:15 -04:00
Domenico Rizzo
e8b5ecd826
MM-57738 - Added GetPluginID function across multiple files (#27960) 2024-08-26 13:39:29 +02:00
Ben Schumacher
6bbf7bbb9f
Update Packet metadata generation based on feedback (#27490) 2024-07-04 21:56:38 +02:00
Ibrahim Serdar Acikgoz
e85d34163c
Add support packet metadata (#27465) 2024-06-27 15:27:57 +02:00
Julien Tant
e96db725ea
PluginAPI: add ability to retrieve users by ids (#26936)
* pluginapi: ability to retrieve users by ids

* fix test
2024-05-15 07:06:40 -07:00
Jesse Hallam
acbaf4c283
add UpdateUserRoles to plugin api (#26615)
* ProfileImageBytes for EnsureBotOptions

* leverage plugintest.NewAPI

* fix linting

* add UpdateUserRoles to plugin api
2024-03-29 19:22:54 -03:00
Harrison Healey
0a1acfeb80
Add some more tests to the plugin API (#26057)
Automatic Merge
2024-02-12 13:12:05 +02:00
Doug Lauder
7b7bcff821
Shared channels auto-share DM & group messages (#26097)
* option for auto inviting plugin to all shared channels.
* auto-invite remotes to shared channels when flag set
2024-02-09 10:47:12 -05:00
Harrison Healey
4d96c11314
MM-56083 Add PatchMultipleMembersNotifyProps plugin API (#25690)
* Add ChannelStore.UpdateMultipleMembersNotifyProps

* Make UpdateMultipleMembersNotifyProps return updated values from the DB

* Add UpdateChannelMembersNotifications plugin API

* Extract i18n

* Fix style

* Make layers

* Change to PatchMultipleMembersNotifyProps

* Add limit to PatchChannelMembersNotifyProps

* Add additional unit tests

* Address feedback

* Lowercase decodeJSON

* Have PatchMultipleMembersNotifyProps update LastUpdateAt

* Fix tests that relied on unreliable return order

* Fix i18n
2024-01-11 13:24:52 -05:00
Harrison Healey
59549653a7
MM-56147 Add GetPreferenceForUser plugin API (#25704)
* MM-56147 Add GetPreferenceForUser plugin API

* Change return type to non-pointer for preference consistency

* Fix merge
2024-01-04 13:50:19 -05:00
Doug Lauder
2d1135ca46
Shared channels plugin APIs for MS Teams plugin (#25805)
New plugin APIs and hooks for accessing Shared Channels service via plugin. 

- RegisterPluginForSharedChannels(opts model.RegisterPluginOpts) (remoteID string, err error)
- UnregisterPluginForSharedChannels(pluginID string) error
- ShareChannel(sc *model.SharedChannel) (*model.SharedChannel, error)
- UpdateSharedChannel(sc *model.SharedChannel) (*model.SharedChannel, error)
- UnshareChannel(channelID string) (unshared bool, err error)
- UpdateSharedChannelCursor(channelID, remoteID string, cusror model.GetPostsSinceForSyncCursor) error
- SyncSharedChannel(channelID string) error
- InviteRemoteToChannel(channelID string, remoteID string, userID string) error
- UninviteRemoteFromChannel(channelID string, remoteID string) error

Hooks
- OnSharedChannelsSyncMsg(msg *model.SyncMsg, rc *model.RemoteCluster) (model.SyncResponse, error)
- OnSharedChannelsPing(rc *model.RemoteCluster) bool
2023-12-22 17:00:27 -05:00
Jesse Hallam
48bf4e9bd8
Fix issue 25390 (#25403) 2023-11-10 21:55:33 -04:00
Jesús Espino
c9d49536f8
Adding SetFileSearchableContent plugin API endpoint (#24355)
* Adding SetFileSearchableContent plugin API endpoint

* Fixing CI problems

* Fixing CI problems

* Fixing CI problems

* Fixing CI problems

* Fixing CI problems

* Exposing it to the public API

* Fix CI problems

* Adding SetSearchableContent to the pluginapi File struct
2023-08-30 13:43:40 -07:00
Christopher Poile
69c11cfe14
MM-53924 - Implement push notifications plugin hook and plugin api method (#24350)
* Revert "MM-52804 - Implement SendPushNotification plugin api method (#24273)"

This reverts commit 8418eefb75.

* Revert "MM-53924 - Implement NotificationWillBePushed plugin hook (#24263)"

This reverts commit f13a531bca.

* implement NotificationWillBePushed plugin hook

* implement SendPushNotification plugin api method

* move where we're setting post and channel type

* fix comment

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-08-24 12:33:53 -04:00
Christopher Poile
8418eefb75
MM-52804 - Implement SendPushNotification plugin api method (#24273)
* add SendPushNotification plugin api method

* lint; add testing.Short bc of the sleep

* add interface and generated layers

* add fields to PluginPushNotification; generate mocks

* SendPushNotification -> SendPluginPushNotification; improved comments

* more comments; fix test

* send api.ctx
2023-08-18 13:05:26 -04:00
Jesse Hallam
8abc8ed65c
MM-53358: Revert Threads Everywhere (#23882)
Remove changes related to the unshipped threads everywhere feature, including commits b8da473da7 and 9f9e19e05d.

Since a version of Playbooks shipped calling this experimental API, keep a `nil` implementation to avoid breaking compatibility. We remove the hooks altogether, but keep the numbering again to avoid breaking compatbility.

Fixes: https://mattermost.atlassian.net/browse/MM-53358
2023-06-30 15:31:25 -03:00
Agniva De Sarker
efaa6264cc
MM-53032: Fix module path after repo rename (#23689)
It was a good decision in hindsight to keep the public module as 0.x
because this would have been a breaking change again.

https://mattermost.atlassian.net/browse/MM-53032
```release-note
Changed the Go module path from github.com/mattermost/mattermost-server/server/v8 to github.com/mattermost/mattermost/server/v8.

For the public facing module, it's path is also changed from github.com/mattermost/mattermost-server/server/public to github.com/mattermost/mattermost/server/public
```
2023-06-11 10:54:35 +05:30
Jesse Hallam
bb02b35048
Expose public/ API as submodule (#23345)
* model -> public/model

* plugin -> public/plugin

* public/model/utils -> public/utils

* platform/shared/mlog -> public/shared/mlog

* platform/shared/i18n -> public/shared/i18n

* platform/shared/markdown -> public/shared/markdown

* platform/services/timezones -> public/shared/timezones

* channels/einterfaces -> einterfaces

* expose public/ submodule

* go mod tidy

* .github: cache-dependency-path, setup-go-work

* modules-tidy for public/ too

* remove old gomodtidy
2023-05-10 13:07:02 -03:00
Renamed from server/plugin/api.go (Browse further)