Skip to content

Commit

Permalink
[MI-3395] Fixed the issue of email notifications being sent for synth…
Browse files Browse the repository at this point in the history
…etic users (#240)

Added the logic of setting notify_props of the user when he's being created
  • Loading branch information
manojmalik20 authored Aug 14, 2023
1 parent 254fbb9 commit 2cd5de6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions server/handlers/getters.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,8 @@ func (ah *ActivityHandler) getOrCreateSyntheticUser(user *msteams.User, createSy
Password: ah.plugin.GenerateRandomPassword(),
RemoteId: &shortUserID,
}
newMMUser.SetDefaultNotifications()
newMMUser.NotifyProps[model.EmailNotifyProp] = "false"

userSuffixID := 1
for {
Expand Down
2 changes: 2 additions & 0 deletions server/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,8 @@ func (p *Plugin) syncUsers() {
FirstName: msUser.DisplayName,
Username: username,
}
newMMUser.SetDefaultNotifications()
newMMUser.NotifyProps[model.EmailNotifyProp] = "false"

var newUser *model.User
for {
Expand Down

0 comments on commit 2cd5de6

Please sign in to comment.