SneedChat Complaint Thread

  • 🐕 I am attempting to get the site runnning as fast as possible. If you are experiencing slow page load times, please report it.
Did the report work? I think I broke chat when I tried one to see.
Report button seems to be MIA. If you hover a post, there's a tiny . on the far right instead. Tried resizing a few ways and moving browsers/tabs and it's the same.

1654661428340.png

Edit: Report button is back. All hail the Errverlerd, squasher of bug reports so he can drown in chat reports.
1654714510616.png
 
Last edited:
I'm not a fan of it so far.

Images break chat. All conversation gets shoved up and lost because they're so huge. As well, it seems like images break scrolling for me and require a refresh.

Not having notifications via chat feels weird. I know it's not necessary but it was a nice feature in case you didn't want to stay glued to the chat but may be having a somewhat slow conversation.

Actually connecting to chat can take something like five seconds and is noticeable because of frequent disconnects. I don't think it's my Internet at fault.
 
on samsung internet's builtin dark mode, the input box is the same color as the background, nothing too big as i can still type in it but it kind of looks weird having it look like empty space
 
  • Informative
Reactions: Dork Of Ages
UI quirk: if you look at the chat, tab or alt-tab away, then come back, you're still looking at the same spot in chat. You have to manually scroll down to the bottom every time.

Can you have the tab keep scrolling with the most recent messages while it's not in focus?
 
  • Like
Reactions: Dork Of Ages
Anchoring seems to randomly trigger. Seems most common if someone uploads an image or if a post is just a pixel or two off. So chat won't update or auto scroll if that happens. Happens even when not alt-tabbed.
 
  • Like
Reactions: Dork Of Ages
Code:
// https://git.kiwifarms.net/KiwiFarms/ruforo/src/branch/master/src/web/chat/server.rs
fn handle(
        &mut self,
        message: message::ClientMessage,
        _ctx: &mut Context<Self>,
    ) -> Self::Result {
        if message.author.can_send_message() {
            let db = self.db.clone();
            let mut redis = self.redis.clone();
            Box::pin(
                async move { crate::compat::xf::message::insert_chat_message(&message, &db).await }
                    .into_actor(self)
                    .map(move |message, actor, _ctx| {
                        actor.send_message(
                            &message.room_id,
                            &serde_json::to_string(&message)
                                .expect("ClientMessage stringify failed."),
                        );
                    }),
            )
        } else {
            self.send_message_to(message.id, "You cannot send messages.");
            Box::pin(async {}.into_actor(self))
        }
    }
Code:
// https://git.kiwifarms.net/KiwiFarms/ruforo/src/branch/master/src/web/chat/message.rs
#[derive(Serialize)]
pub struct ClientMessage {
    /// Conn Id
    pub id: usize,
    /// Author Session
    pub author: XfAuthor,
    /// Recipient room
    pub room_id: usize,
    /// Message ID from database
    pub message_id: u32,
    /// Message Data
    pub message_date: i32,
    /// Peer message
    pub message: String,
}
Code:
// https://git.kiwifarms.net/KiwiFarms/ruforo/src/branch/master/src/compat/xf/session.rs
#[derive(Clone, Debug, Serialize)]
pub struct XfAuthor {
    pub id: u32,
    pub username: String,
    pub avatar_date: u32,
}
impl From<&XfSession> for XfAuthor {
    fn from(session: &XfSession) -> Self {
        Self {
            id: session.id,
            username: session.username.to_owned(),
            avatar_date: session.avatar_date,
        }
    }
}
impl XfAuthor {
    pub fn can_send_message(&self) -> bool {
        self.id > 0
    }
    pub fn get_avatar_uri(&self) -> String {
        format!(
            "{}/data/avatars/m/{}/{}.jpg?{}",
            std::env::var("XF_PUBLIC_URL").expect("XF_PUBLIC_URL must be set in .env"),
            self.id / 1000,
            self.id,
            self.avatar_date
        )
    }
}

@Null, I'm guess for Tor users their user id is 0. Are id cerated based on IP addresses at all? A Tor user won't have a valid address or other meta data the might do into creating the id.

In the mean time try recompiling with this change:

Code:
pub fn can_send_message(&self) -> bool {
    true
}


Of course you don't want to leave it like that for forever, it's just to see if that's where the break-down is happening.
 
  • Like
Reactions: Dork Of Ages
If you don't know anything about what you're doing i don't know why you're auditing the code. You are wasting my time asking for explanations about shit you do not understand.

The issue is authenticating by session cookie breaks mysteriously for certain high-autism browsers. I'm not going to commit to fixing it for now.
 
the issue was that the .env for the wss url is always kiwifarms.net which breaks .is and .onion, I have added a very cheeky javascript hack to fix the domain without distracting myself from what I'm working on.

there was a second issue specifically affecting tor where wss:// was an invalid protocol for tor so it downgrades to ws:// if you're on http (only tor users are).
 
Whoever wrote that BBcode parser is a fucking retard. But allow me to elaborate:
- The parser always treats a left square bracket as a part of BBcode, meaning:
- You cannot leave an emote like ">:[" because it will eat the bracket leaving just ">:"​
- If you leave an emote like this and then type a message after it then it will close the bracket at the end of the message as if it was a BBcode block​
- The backward slash cannot be placed into the chat, because:
- It is always treated as an escape character so placing just the backward slash will cause it to disappear​
- If you escape the backward slash the dumb fuck parser leaves a forward slash anyway​
- Also if one tries to embed an image by placing both the opening and closing BBcode block, the image will be embedded with both of the blocks being visible as text. Embedding an image with just the opening block will embed the image without any unwanted BBcode blocks in the message.

And if it matters, the browser is Vivaldi 5.3 on Chromium 102, and the OS is Windows 10 21H2 x64.

EDIT: Sorry I forgot the parser is written from scratch and it's not pre-existing code from a third party.
 
Back