logging + networking fix
This commit is contained in:
1 parent
092ef6185f
commit
563dd7a759
4 files changed
+21
-4
No files matched your search
@@ -83,7 +83,7 @@ type Bot struct {
|
||||
type incoming struct {
|
||||
user, channel, ts, threadTS, text string
|
||||
dm bool
|
||||
heard bool
|
||||
heard bool
|
||||
}
|
||||
|
||||
func (m incoming) owner() (string, model.OwnerKind) {
|
||||
@@ -268,6 +268,7 @@ func (b *Bot) onMessage(ctx context.Context, m incoming) {
|
||||
Channel: m.channel, ThreadTS: root, OwnerID: u.ID,
|
||||
ACPID: id, Title: title(m.text), CreatedAt: time.Now(),
|
||||
})
|
||||
log.Printf("thread: new thread %s/%s for %s %s (started by %s, session %s)", m.channel, root, u.Kind, u.ID, m.user, id)
|
||||
if w := b.where(ctx, m.channel); w != "" {
|
||||
text = "(You're in " + w + ". Each message starts with the sender's name.)\n" + text
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user