fix(ActivityCenter): Update status-go ActivityCenterNotificationTypeCommunityKicked and fix accepting community requests from AC (#10283)

* fix(ActivityCenter): Move ActivityCenterNotificationTypeCommunityKicked to the right place

Close #9811

* fix(ActivityCenter): fix accepting community request to join
This commit is contained in:
Mikhail Rogachev 2023-04-14 15:27:13 +04:00 committed by GitHub
parent aefa2b9f48
commit c1b28d23c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 5 deletions

View File

@ -125,12 +125,15 @@ QtObject:
if (receivedData.activityCenterNotifications.len > 0):
self.handleNewNotificationsLoaded(receivedData.activityCenterNotifications)
proc parseActivityCenterResponse*(self: Service, response: RpcResponse[JsonNode]) =
proc parseActivityCenterNotifications*(self: Service, notificationsJson: JsonNode) =
var activityCenterNotifications: seq[ActivityCenterNotificationDto] = @[]
for notificationJson in notificationsJson:
activityCenterNotifications.add(notificationJson.toActivityCenterNotificationDto)
self.handleNewNotificationsLoaded(activityCenterNotifications)
proc parseActivityCenterResponse*(self: Service, response: RpcResponse[JsonNode]) =
if response.result{"activityCenterNotifications"} != nil:
for jsonMsg in response.result["activityCenterNotifications"]:
activityCenterNotifications.add(jsonMsg.toActivityCenterNotificationDto)
self.handleNewNotificationsLoaded(activityCenterNotifications)
self.parseActivityCenterNotifications(response.result["activityCenterNotifications"])
proc setActiveNotificationGroup*(self: Service, group: ActivityCenterGroup) =
self.activeGroup = group

View File

@ -1367,6 +1367,7 @@ QtObject:
self.events.emit(SIGNAL_COMMUNITY_EDITED, CommunityArgs(community: self.communities[communityId]))
self.events.emit(SIGNAL_COMMUNITY_MEMBER_APPROVED, CommunityMemberArgs(communityId: communityId, pubKey: userKey, requestId: requestId))
self.activityCenterService.parseActivityCenterNotifications(rpcResponseObj["response"]["result"]["activityCenterNotifications"])
except Exception as e:
let errMsg = e.msg

2
vendor/status-go vendored

@ -1 +1 @@
Subproject commit e5093124f2e2b4c51b8501bf1d48af9bcce71560
Subproject commit 302437e32ecfedfa9964eeb6ea10fc0122c8a984