Skip to content

Commit

Permalink
Fix logging and get rid of annoying malformed rn-bridge error on back…
Browse files Browse the repository at this point in the history
…ground
  • Loading branch information
islathehut committed Oct 24, 2024
1 parent b391aec commit eebacb2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/backend/src/nest/common/logger.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import { createQuietLogger } from '@quiet/logger'

export const createLogger = createQuietLogger('backend', true)
export const createLogger = createQuietLogger('backend')
3 changes: 2 additions & 1 deletion packages/backend/src/rn-bridge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,11 @@ const initRnBridge = () => {
}

static parsePayload(message: string) {
logger.warn('rn-bridge payload', message)
const parsed: { [key: string]: string } = {}
const entries = message.split('|')
if (entries.length < 1) {
logger.warn('Malformed or non-existen rn-bridge payload ', entries)
logger.warn('Malformed or non-existent rn-bridge payload ', entries)
return parsed
}
entries.forEach(s => {
Expand Down
2 changes: 1 addition & 1 deletion packages/mobile/ios/Quiet/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ - (void)applicationDidEnterBackground:(UIApplication *)application
{
[self stopTor];

NSString * message = [NSString stringWithFormat:@""];
NSString * message = [NSString stringWithFormat:@"app:close"];
[self.nodeJsMobile sendMessageToNode:@"close":message];

// Flush persistor before app goes idle
Expand Down

0 comments on commit eebacb2

Please sign in to comment.