remove twitter character limit nonsense

This commit is contained in:
gutmet 2022-11-21 07:41:28 +01:00
parent df26f14e2a
commit 86cf57780e

View File

@ -191,12 +191,12 @@ func splitStatus(status string) []string {
// Twitter has an insane definition of what counts as a character // Twitter has an insane definition of what counts as a character
// ( see https://developer.twitter.com/en/docs/counting-characters ) // ( see https://developer.twitter.com/en/docs/counting-characters )
// - as a crude approximation, anything outside LATIN-1 halfs the limit // - as a crude approximation, anything outside LATIN-1 halfs the limit
for _, ch := range status { // for _, ch := range status {
if ch > 0x10FF { // if ch > 0x10FF {
characterLimit = CHARACTER_LIMIT / 2 // characterLimit = CHARACTER_LIMIT / 2
break // break
} // }
} // }
asRunes := []rune(status) asRunes := []rune(status)
split := []string{} split := []string{}
for len(asRunes) != 0 { for len(asRunes) != 0 {