mirror of
https://github.com/hexastack/hexabot
synced 2025-06-26 18:27:28 +00:00
fix: event consistent naming
This commit is contained in:
@@ -304,7 +304,7 @@ export class BlockService extends BaseService<Block, BlockPopulate, BlockFull> {
|
||||
subscriberContext: SubscriberContext,
|
||||
settings: Settings,
|
||||
): string {
|
||||
const vars = { ...subscriberContext.vars, ...context.vars };
|
||||
const vars = { ...(subscriberContext?.vars || {}), ...context.vars };
|
||||
// Replace context tokens with their values
|
||||
Object.keys(vars).forEach((key) => {
|
||||
if (typeof vars[key] === 'string' && vars[key].indexOf(':') !== -1) {
|
||||
|
||||
@@ -287,7 +287,7 @@ export class ChatService {
|
||||
*
|
||||
* @param subscriber - The end user (subscriber)
|
||||
*/
|
||||
@OnEvent('hook:chatbot:subscriber:create')
|
||||
@OnEvent('hook:subscriber:create')
|
||||
onSubscriberCreate(subscriber: Subscriber) {
|
||||
this.websocketGateway.broadcastSubscriberNew(subscriber);
|
||||
}
|
||||
@@ -297,7 +297,7 @@ export class ChatService {
|
||||
*
|
||||
* @param subscriber - The end user (subscriber)
|
||||
*/
|
||||
@OnEvent('hook:chatbot:subscriber:update:after')
|
||||
@OnEvent('hook:subscriber:update:after')
|
||||
onSubscriberUpdate(subscriber: Subscriber) {
|
||||
this.websocketGateway.broadcastSubscriberUpdate(subscriber);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user