mirror of
https://github.com/discourse/discourse.git
synced 2025-06-06 03:06:53 +08:00
Revert "FEATURE: Send notification when member was accepted to group. (#7503)"
This reverts commit 42c82d544ecfe138da5b0b5a336be2109179cf26.
This commit is contained in:
@ -506,20 +506,9 @@ class Group < ActiveRecord::Base
|
||||
|
||||
PUBLISH_CATEGORIES_LIMIT = 10
|
||||
|
||||
def add(user, notify: false)
|
||||
def add(user)
|
||||
self.users.push(user) unless self.users.include?(user)
|
||||
|
||||
if notify
|
||||
Notification.create!(
|
||||
notification_type: Notification.types[:group_invite],
|
||||
user_id: user.id,
|
||||
data: {
|
||||
group_id: id,
|
||||
group_name: name
|
||||
}.to_json
|
||||
)
|
||||
end
|
||||
|
||||
if self.categories.count < PUBLISH_CATEGORIES_LIMIT
|
||||
MessageBus.publish('/categories', {
|
||||
categories: ActiveModel::ArraySerializer.new(self.categories).as_json
|
||||
|
Reference in New Issue
Block a user