fixed bot名称

This commit is contained in:
xxq250 2023-03-14 15:23:31 +08:00
parent a0d4f2f404
commit 91f2fab851
1 changed files with 1 additions and 1 deletions

View File

@ -37,7 +37,7 @@ class InstallationsController < ApplicationController
# 注册bot对应oauth应用
Doorkeeper::Application.create!(name: @bot.name, uid: @bot.client_id, secret: @bot.client_secret, redirect_uri: "https://gitlink.org.cn")
# 注册bot对应用户
result = autologin_register(User.generate_user_login('b'), nil, "#{SecureRandom.hex(6)}", 'bot', nil, nickname: @bot.name)
result = autologin_register(User.generate_user_login('b'), nil, "#{SecureRandom.hex(6)}", 'bot', nil, @bot.name)
tip_exception(-1, result[:message]) if result[:message].present?
@bot.uid = result[:user][:id]
@bot.save