From 1f0a1b7292c879ce33db42a328d4d9777d11948a Mon Sep 17 00:00:00 2001 From: Martin Dosch Date: Thu, 6 Apr 2023 17:51:14 +0200 Subject: [PATCH] =?UTF-8?q?i18n:=20fr=C3=A4nggisch?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- getArticles.go | 2 +- processStanzas.go | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/getArticles.go b/getArticles.go index b6573d6..09b1b1c 100644 --- a/getArticles.go +++ b/getArticles.go @@ -13,8 +13,8 @@ import ( "strings" "time" - "github.com/mmcdole/gofeed" "github.com/jaytaylor/html2text" + "github.com/mmcdole/gofeed" ) // Get new articles for specified feed. diff --git a/processStanzas.go b/processStanzas.go index 48aaa85..9c11d65 100644 --- a/processStanzas.go +++ b/processStanzas.go @@ -124,9 +124,13 @@ func processStanzas(client *xmpp.Client, muc string, mucNick string, feeds []str } } // Reply with pong to ping requests. - case "ping": - - reply := "pong" + case "ping", "bing": + var reply string + if command == "bing" { + reply = "bong" + } else { + reply = "pong" + } if v.Type == "groupchat" { _, err = client.Send(xmpp.Chat{Remote: muc,