suppress log messages for system-messages-from-hub
This commit is contained in:
parent
8ba57e36e6
commit
c27708bb9b
@ -287,9 +287,14 @@ func (this *NTFServer) HandleHubMessage(msg upstreamMessage) {
|
|||||||
|
|
||||||
switch msg.evt.EventType {
|
switch msg.evt.EventType {
|
||||||
|
|
||||||
case libnmdc.EVENT_SYSTEM_MESSAGE_FROM_CONN, libnmdc.EVENT_CONNECTION_STATE_CHANGED:
|
case libnmdc.EVENT_SYSTEM_MESSAGE_FROM_CONN, libnmdc.EVENT_SYSTEM_MESSAGE_FROM_HUB:
|
||||||
|
// This includes "want to register your nick?" and chat-catchup messages
|
||||||
|
// Don't mirror them into telegram
|
||||||
log.Printf("Hub(%s): * %s", msg.hubNick, msg.evt.Message)
|
log.Printf("Hub(%s): * %s", msg.hubNick, msg.evt.Message)
|
||||||
|
|
||||||
|
case libnmdc.EVENT_CONNECTION_STATE_CHANGED:
|
||||||
|
log.Printf("Hub(%s): * Connection %s", msg.evt.StateChange.String())
|
||||||
|
|
||||||
case libnmdc.EVENT_PRIVATE:
|
case libnmdc.EVENT_PRIVATE:
|
||||||
err := this.DirectMessageTelegramUser(msg.telegramUserId, fmt.Sprintf("PM from user '%s': %s", msg.evt.Nick, msg.evt.Message))
|
err := this.DirectMessageTelegramUser(msg.telegramUserId, fmt.Sprintf("PM from user '%s': %s", msg.evt.Nick, msg.evt.Message))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user