client: add MemberCount helper method for lazy load summary
Some checks are pending
Go / Lint (latest) (push) Waiting to run
Go / Build (old, libolm) (push) Waiting to run
Go / Build (latest, libolm) (push) Waiting to run
Go / Build (old, goolm) (push) Waiting to run
Go / Build (latest, goolm) (push) Waiting to run

This commit is contained in:
Tulir Asokan 2026-01-18 22:41:34 +02:00
commit 28bcc356db

View file

@ -341,6 +341,13 @@ type LazyLoadSummary struct {
InvitedMemberCount *int `json:"m.invited_member_count,omitempty"`
}
func (lls *LazyLoadSummary) MemberCount() int {
if lls == nil {
return 0
}
return ptr.Val(lls.JoinedMemberCount) + ptr.Val(lls.InvitedMemberCount)
}
func (lls *LazyLoadSummary) Equal(other *LazyLoadSummary) bool {
if lls == other {
return true