Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion tests/msc4429/msc4429_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ func TestMSC4429ProfileUpdates(t *testing.T) {
)

// Bob clears their status.
mustSetProfileField(t, bob, "m.status", nil)
mustDeleteProfileField(t, bob, "m.status")

// Wait until alice sees the status be set to `null` (nil).
alice.MustSyncUntil(
Expand Down Expand Up @@ -276,6 +276,12 @@ func mustSetProfileField(t *testing.T, user *client.CSAPI, field string, value i
)
}

// mustDeleteProfileField clears the given profile field ID on the given user's profile.
func mustDeleteProfileField(t *testing.T, user *client.CSAPI, field string) {
t.Helper()
user.MustDo(t, "DELETE", []string{"_matrix", "client", "v3", "profile", user.UserID, field})
}

// getProfileUpdate extracts the given profile updates for a given user by field
// ID from a legacy `/sync` response.
func getProfileUpdate(res gjson.Result, userID, field string) (gjson.Result, bool) {
Expand Down
Loading