encrypt DMs
This commit is contained in:
parent
df33291d64
commit
7a966c8d2a
1 changed files with 10 additions and 0 deletions
|
|
@ -189,6 +189,16 @@ func (mxc *MXClient) CreateDM(ctx context.Context, uid id.UserID) (resp *mautrix
|
|||
IsDirect: true,
|
||||
Preset: "trusted_private_chat",
|
||||
Invite: []id.UserID{uid},
|
||||
InitialState: []*event.Event{{
|
||||
Type: event.StateEncryption,
|
||||
Content: event.Content{
|
||||
Parsed: &event.EncryptionEventContent{
|
||||
Algorithm: id.AlgorithmMegolmV1,
|
||||
RotationPeriodMillis: 604800000,
|
||||
RotationPeriodMessages: 100,
|
||||
},
|
||||
}},
|
||||
},
|
||||
}
|
||||
|
||||
resp, err = mxc.CreateRoom(context.Background(), &req)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue