messenger, desk-channel, telegram, mesh-config take the channel benches' shapes from the operator-channel contract and its client (B5d; ADR 0634 §1, §6; issue 1966)
Claude-Session: https://claude.ai/code/session_01NcbgfFSnn24M3GcqttoU7i
This commit is contained in:
@@ -20,7 +20,7 @@ import (
|
||||
"strings"
|
||||
"unicode/utf8"
|
||||
|
||||
"git.novox.be/novox/mesh-sdk/go/channel"
|
||||
oc "git.novox.be/novox/mesh-contracts/operator-and-conversation/go/seats/operatorchannel"
|
||||
)
|
||||
|
||||
// ParseMode is the formatting the Bot API is told the text is in.
|
||||
@@ -40,7 +40,7 @@ type shown struct{ title, body, note string }
|
||||
// first: the note carries what each answer does and every value an approval sets, so it is kept whole as long as
|
||||
// the title and the note fit; only then is the note cut, and that said too. The bound is on the words, as
|
||||
// Telegram's is on the text once its markup is read.
|
||||
func partsOf(m channel.Message) shown {
|
||||
func partsOf(m oc.Message) shown {
|
||||
s := shown{title: strings.TrimSpace(m.Title), body: strings.TrimSpace(m.Body), note: strings.TrimSpace(m.Note)}
|
||||
over := utf8.RuneCountInString(s.plain()) - MaxLength
|
||||
if over <= 0 {
|
||||
|
||||
Reference in New Issue
Block a user