mirror of
https://mau.dev/mautrix/go.git
synced 2026-03-14 14:25:53 +01:00
event/capabilities: add max text length field
Some checks failed
Some checks failed
This commit is contained in:
parent
2851065869
commit
bbcb1904e2
2 changed files with 7 additions and 0 deletions
3
event/capabilities.d.ts
vendored
3
event/capabilities.d.ts
vendored
|
|
@ -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. */
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue