mirror of
https://github.com/hexastack/hexabot
synced 2025-03-12 23:20:40 +00:00
feat(api): make methods public
This commit is contained in:
parent
16101f2638
commit
3c8deb854e
@ -68,7 +68,7 @@ export class BotStatsService extends BaseService<BotStats> {
|
||||
* @param {Subscriber} subscriber - The subscriber object that contains last visit and retention data.
|
||||
*/
|
||||
@OnEvent('hook:user:lastvisit')
|
||||
private handleLastVisit(subscriber: Subscriber) {
|
||||
handleLastVisit(subscriber: Subscriber) {
|
||||
const now = +new Date();
|
||||
if (subscriber.lastvisit) {
|
||||
// A loyal subscriber is a subscriber that comes back after some inactivity
|
||||
@ -110,7 +110,7 @@ export class BotStatsService extends BaseService<BotStats> {
|
||||
* @param name - The name or identifier of the statistics entry (e.g., a specific feature or component being tracked).
|
||||
*/
|
||||
@OnEvent('hook:stats:entry')
|
||||
private async handleStatEntry(type: BotStatsType, name: string) {
|
||||
async handleStatEntry(type: BotStatsType, name: string) {
|
||||
const day = new Date();
|
||||
day.setMilliseconds(0);
|
||||
day.setSeconds(0);
|
||||
|
@ -235,7 +235,7 @@ export class SubscriberService extends BaseService<
|
||||
* @param subscriber The subscriber whose is being handled.
|
||||
*/
|
||||
@OnEvent('hook:user:lastvisit')
|
||||
private async handleLastVisit(subscriber: Subscriber) {
|
||||
async handleLastVisit(subscriber: Subscriber) {
|
||||
if (subscriber.lastvisit) {
|
||||
try {
|
||||
const user = await this.updateOne(subscriber.id, {
|
||||
|
Loading…
Reference in New Issue
Block a user