diff --git a/event/capabilities.d.ts b/event/capabilities.d.ts index 1c5d533d..4cf29de7 100644 --- a/event/capabilities.d.ts +++ b/event/capabilities.d.ts @@ -17,6 +17,9 @@ export interface RoomFeatures { */ file?: Record + /** Maximum length of normal text messages. */ + max_text_length?: integer + /** Whether location messages (`m.location`) are supported. */ location_message?: CapabilitySupportLevel /** Whether polls are supported. */ diff --git a/event/capabilities.go b/event/capabilities.go index 6a9b0b56..9c9eb09a 100644 --- a/event/capabilities.go +++ b/event/capabilities.go @@ -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)