Skip to content

Commit

Permalink
member
Browse files Browse the repository at this point in the history
  • Loading branch information
qinmingyuan committed Nov 16, 2024
1 parent 2b03cb8 commit 0193a1e
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions app/models/wechat/ext/member.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,15 @@ def invite_member!
end
end

def invite_contact!(app, tag_name)
scene = scenes.find_or_initialize_by(appid: app.appid, organ_id: organ_id, aim: 'invite_contact', tag_name: tag_name)
scene.check_refresh
scene.save
scene
def invite_contact!(tag_name)
app = organ.provider&.app

if app
scene = scenes.find_or_initialize_by(appid: app.appid, organ_id: organ_id, aim: 'invite_contact', tag_name: tag_name)
scene.check_refresh
scene.save
scene
end
end

def sync_from_wechat_user
Expand Down

0 comments on commit 0193a1e

Please sign in to comment.