event/capabilities: add max text length field
Some checks failed
Go / Lint (latest) (push) Has been cancelled
Go / Build (old, libolm) (push) Has been cancelled
Go / Build (latest, libolm) (push) Has been cancelled
Go / Build (old, goolm) (push) Has been cancelled
Go / Build (latest, goolm) (push) Has been cancelled

This commit is contained in:
Tulir Asokan 2025-01-10 17:40:22 +02:00
commit bbcb1904e2
2 changed files with 7 additions and 0 deletions

View file

@ -17,6 +17,9 @@ export interface RoomFeatures {
*/
file?: Record<CapabilityMsgType, FileFeatures>
/** Maximum length of normal text messages. */
max_text_length?: integer
/** Whether location messages (`m.location`) are supported. */
location_message?: CapabilitySupportLevel
/** Whether polls are supported. */

View file

@ -30,6 +30,8 @@ type RoomFeatures struct {
Formatting FormattingFeatureMap `json:"formatting,omitempty"`
File FileFeatureMap `json:"file,omitempty"`
MaxTextLength int `json:"max_text_length,omitempty"`
LocationMessage CapabilitySupportLevel `json:"location_message,omitempty"`
Poll CapabilitySupportLevel `json:"poll,omitempty"`
Thread CapabilitySupportLevel `json:"thread,omitempty"`
@ -215,6 +217,8 @@ func (rf *RoomFeatures) Hash() []byte {
hashMap(hasher, "formatting", rf.Formatting)
hashMap(hasher, "file", rf.File)
hashInt(hasher, "max_text_length", rf.MaxTextLength)
hashValue(hasher, "location_message", rf.LocationMessage)
hashValue(hasher, "poll", rf.Poll)
hashValue(hasher, "thread", rf.Thread)