diff --git a/src/app_service/service/community/service.nim b/src/app_service/service/community/service.nim index 9a1f7ab720..05744d1ef3 100644 --- a/src/app_service/service/community/service.nim +++ b/src/app_service/service/community/service.nim @@ -883,7 +883,8 @@ QtObject: bannerJsonStr: string, encrypted: bool) = try: - var image = singletonInstance.utils.formatImagePath(imageUrl) + var bannerJson = bannerJsonStr.parseJson + bannerJson{"imagePath"} = newJString(singletonInstance.utils.formatImagePath(bannerJson["imagePath"].getStr)) var tagsString = tags if len(tagsString) == 0: tagsString = "[]" @@ -896,11 +897,11 @@ QtObject: access, color, tagsString, - image, + singletonInstance.utils.formatImagePath(imageUrl), aX, aY, bX, bY, historyArchiveSupportEnabled, pinMessageAllMembersEnabled, - bannerJsonStr, + $bannerJson, encrypted) if response.error != nil: @@ -943,6 +944,8 @@ QtObject: let logoJson = parseJson(logoJsonStr) let cropRectJson = logoJson["cropRect"] var tagsString = tags + var bannerJson = bannerJsonStr.parseJson + bannerJson{"imagePath"} = newJString(singletonInstance.utils.formatImagePath(bannerJson["imagePath"].getStr)) if len(tagsString) == 0: tagsString = "[]" let response = status_go.editCommunity( @@ -954,12 +957,12 @@ QtObject: access, color, tagsString, - logoJson["imagePath"].getStr(), + singletonInstance.utils.formatImagePath(logoJson["imagePath"].getStr()), int(cropRectJson["x"].getFloat()), int(cropRectJson["y"].getFloat()), int(cropRectJson["x"].getFloat() + cropRectJson["width"].getFloat()), int(cropRectJson["y"].getFloat() + cropRectJson["height"].getFloat()), - bannerJsonStr, + $bannerJson, historyArchiveSupportEnabled, pinMessageAllMembersEnabled)