mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-07-31 13:22:46 +00:00
Various roominfo tweaks (#2607)
This commit is contained in:
parent
eab87ef07d
commit
ca3fa58388
5 changed files with 50 additions and 16 deletions
|
@ -310,3 +310,16 @@ func (r *RoomInfo) SetIsStub(isStub bool) {
|
|||
defer r.mu.Unlock()
|
||||
r.isStub = isStub
|
||||
}
|
||||
|
||||
func (r *RoomInfo) CopyFrom(r2 *RoomInfo) {
|
||||
r.mu.Lock()
|
||||
defer r.mu.Unlock()
|
||||
|
||||
r2.mu.RLock()
|
||||
defer r2.mu.RUnlock()
|
||||
|
||||
r.RoomNID = r2.RoomNID
|
||||
r.RoomVersion = r2.RoomVersion
|
||||
r.stateSnapshotNID = r2.stateSnapshotNID
|
||||
r.isStub = r2.isStub
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue