File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -1385,7 +1385,7 @@ function sepiaFW_build_ui_build(){
13851385 //find correct channel
13861386 var activeChannel = SepiaFW . client . getActiveChannel ( ) ;
13871387 if ( msg . channelId && msg . channelId == "info" ) {
1388- msg . channelId = activeChannel ;
1388+ if ( activeChannel ) msg . channelId = activeChannel ; //try active channel - if we don't have one stick with 'info'
13891389 }
13901390 if ( ! msg . channelId ) {
13911391 msg . channelId = SepiaFW . account . getUserId ( ) || "" ; //TODO: what shall we do without channel ID?
@@ -1576,13 +1576,17 @@ function sepiaFW_build_ui_build(){
15761576 var senderText = ( senderName ) ? senderName : sender ;
15771577 var time = SepiaFW . tools . getLocalTime ( ) ; //msg.time; //for display we just take the client recieve time
15781578 //var timeUNIX = msg.timeUNIX;
1579+ var channelId = msg . channelId || SepiaFW . client . getActiveChannel ( ) ;
1580+ if ( ! channelId ) {
1581+ channelId = 'info' ; //TODO: do we want that here?
1582+ }
15791583
15801584 //type analysis
15811585 var classes = type || '' ; //assistant, client, server
15821586
15831587 var block = document . createElement ( 'DIV' ) ;
15841588 block . className = 'statusMsg' ;
1585- block . dataset . channelId = SepiaFW . client . getActiveChannel ( ) ; //TODO: do we want that here?
1589+ block . dataset . channelId = channelId ;
15861590 var article = document . createElement ( 'ARTICLE' ) ;
15871591 article . className = 'statusUpdate' ;
15881592 if ( isErrorMessage ) {
Original file line number Diff line number Diff line change @@ -332,7 +332,7 @@ function sepiaFW_build_ui(){
332332 //switch channel view (show messages of specific channel)
333333 UI . switchChannelView = function ( channelId ) {
334334 //hide all messages with channelId but wrong one
335- $ ( '#sepiaFW-chat-output' ) . find ( "[data-channel-id]" ) . not ( "[data-channel-id='" + channelId + "']" ) . each ( function ( ) {
335+ $ ( '#sepiaFW-chat-output' ) . find ( "[data-channel-id]" ) . not ( "[data-channel-id='" + channelId + "']" ) . not ( "[data-channel-id='info']" ) . each ( function ( ) {
336336 //$(this).fadeOut(150);
337337 $ ( this ) . addClass ( 'hidden-by-channel' ) ;
338338 } ) ;
You can’t perform that action at this time.
0 commit comments