诸侯混战:修复重复打开不同城门推送问题
This commit is contained in:
@@ -19,6 +19,7 @@ import { sendMessageToCityWithSuc } from "../../../services/pushService";
|
||||
import { isDebugTime } from "../../../pubUtils/sdkUtil";
|
||||
import { GuildActivityCityDeclareModel } from "../../../db/GuildActivityCityDeclare";
|
||||
import { GuildModel } from "../../../db/Guild";
|
||||
import { getHistoryCity, setHistoryCity } from "../../../services/redisService";
|
||||
|
||||
export default function (app: Application) {
|
||||
new HandlerService(app, {});
|
||||
@@ -97,13 +98,12 @@ export class CityActivityHandler {
|
||||
obj.pushGuild(guildCode, serverId, cityId);
|
||||
}
|
||||
|
||||
let historyCity = obj.getHistoryCity(roleId);
|
||||
let historyCity = await getHistoryCity(roleId);
|
||||
if (historyCity) {
|
||||
await leaveCityChannel(roleId, sid, historyCity);
|
||||
}
|
||||
await addRoleToCityChannel(roleId, sid, cityId);
|
||||
obj.setHistoryCity(roleId, cityId);
|
||||
|
||||
await setHistoryCity(roleId, cityId);
|
||||
|
||||
let ranks = await getCityActivityRank(guildCode, serverId, cityId, roleId, roleName);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user