File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 1
- import { Webxdc , ReceivedStatusUpdate , RealtimeListener as WebxdcRealtimeListener } from "@webxdc/types" ;
1
+ import { Webxdc , ReceivedStatusUpdate } from "@webxdc/types" ;
2
2
import { RealtimeListener as RTL } from "../backend/message"
3
3
type UpdatesMessage = {
4
4
type : "updates" ;
@@ -72,8 +72,9 @@ export function createWebXdc(
72
72
} else if ( isRealtimeMessage ( message ) ) {
73
73
// TODO: move this out of setUpdateListener because otherwise
74
74
// You have to set an update listener such that realtime works
75
- console . log ( "received realtime data at frontend" )
76
- realtime ! . receive ( message . data )
75
+ // Conversion to any because the actual data is a dict representation of Uint8Array
76
+ // This is due to JSON.stringify conversion.
77
+ realtime ! . receive ( new Uint8Array ( Object . values ( message . data as any ) ) )
77
78
} else if ( isClearMessage ( message ) ) {
78
79
log ( "clear" ) ;
79
80
transport . clear ( ) ;
You can’t perform that action at this time.
0 commit comments