fix: update analytics profile room IDs on change, set via parameter in analytics room knock request (#4949)
This commit is contained in:
parent
d8caf8e481
commit
61fa30dba5
2 changed files with 9 additions and 2 deletions
|
|
@ -289,7 +289,14 @@ class SpaceAnalyticsState extends State<SpaceAnalytics> {
|
|||
try {
|
||||
final roomId = _analyticsRoomIdOfUser(user);
|
||||
if (roomId == null) return;
|
||||
await Matrix.of(context).client.knockRoom(roomId);
|
||||
await Matrix.of(context).client.knockRoom(
|
||||
roomId,
|
||||
via: room?.spaceChildren
|
||||
.firstWhereOrNull(
|
||||
(child) => child.roomId == roomId,
|
||||
)
|
||||
?.via,
|
||||
);
|
||||
status = RequestStatus.requested;
|
||||
} catch (e) {
|
||||
status = RequestStatus.unavailable;
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ class AnalyticsProfileModel {
|
|||
}
|
||||
|
||||
final currentRoomId = analyticsRoomIdByLanguage(language);
|
||||
if (currentRoomId == null) {
|
||||
if (currentRoomId != analyticsRoomId) {
|
||||
languageAnalytics![language]!.analyticsRoomId = analyticsRoomId;
|
||||
}
|
||||
languageAnalytics![language]!.level = level;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue