suppress log messages for system-messages-from-hub

This commit is contained in:
mappu 2018-06-04 19:17:14 +12:00
parent 8ba57e36e6
commit c27708bb9b

View File

@ -287,9 +287,14 @@ func (this *NTFServer) HandleHubMessage(msg upstreamMessage) {
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)
case libnmdc.EVENT_CONNECTION_STATE_CHANGED:
log.Printf("Hub(%s): * Connection %s", msg.evt.StateChange.String())
case libnmdc.EVENT_PRIVATE:
err := this.DirectMessageTelegramUser(msg.telegramUserId, fmt.Sprintf("PM from user '%s': %s", msg.evt.Nick, msg.evt.Message))
if err != nil {