Giter Club home page Giter Club logo

main's People

Contributors

0x17de avatar 4ntil0l avatar annikav9 avatar antil0l avatar arteombalanuta avatar bacn avatar brilliantbetty avatar bujijam avatar dependabot[bot] avatar ffuv avatar heapoverride avatar henrywright avatar legendlife avatar marzavec avatar mattmadness avatar minusgix avatar opsimple avatar paulgreg avatar po5i avatar rand0x0m avatar roslot avatar xjzh123 avatar xyzpw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

main's Issues

Issue with rendering on Ipads

I wanted to talk to a friend (I'm using a macbook pro) with google chrome. The Site rendered fine. The friend is using an ipad pro. When he clicked on my custom chat link, he saw the following screen:
image

He was never asked to select himself a username, and furthermore he couldn't use the bottom bar to type, nor was he able to see that I was online

admin access

When i'm logging in as 'adminname' to any page, i see 'gtfo' and can't write. How can i login as admin and where?

Admin not receiving messages sent to moderators

There's a variety of commands (mostly moderator commands) that simply don't send messages to the Admin user, but do to the moderators (and even the users).
Example: The ban command.
When it's used (by a mod or admin), the mods see: gamma banned test in programming, userhash: R8nS3bOrM6zChZJ, the normal users see Banned test, and the Admin sees neither of those. The Admin has no clue anyone was banned, except if they take a look at the logs.
This is also a problem with several other commands, but I'm unsure of the best way to fix it.
Ideas:

  • Change most usages of 'mod' as a userType for filtering to (u) => u == 'mod' || 'admin'. This is the most 'fitting' method with how the MainServer#findSockets function works, but it requires editing every usage to do this method.
  • Add a special-case userType called 'min-mod' which shows the messages to moderators, and admins. This has the downside that findSockets would need to have specialization for a specific key, when it's currently super generic.
  • Add a global object called Filter which has a function named minMod that is literally (u) => u == 'mod' || 'admin'. This is basically a twist on option No. 1, but has the downside of being a global and the upside of putting that repetitive action into it's own function.

Personally I'm leaning towards No. 1, but any thoughts? Once I get an opinion on the method to use, I'll probably just send in a pr which changes lots of small lines, and hope I got all of them.

add end to end encryption

my suggestion each new client creates a private and public key and share the public key after this encrypt every message.

color scheme selector doesn't pull in new scheme

When I select a new color scheme, a color scheme is not imported. Looking at the chrome console log, the browser couldn't find the file for any of the available themes. I changed one line in the client.js file.
$('#scheme-link').href = "/schemes/" + scheme + ".css"
to
$('#scheme-link').href = "./schemes/" + scheme + ".css"

Color schemes worked properly for me after that change.

Mobile UI feature request

When the client is rewritten, would it be feasible to make it addable to the home screen? For example, when you add Mastodon's website to a mobile device's home screen, it acts as a native app.
If this requires a separate client to be written just for the mobile site, then this wouldn't be practical.

Many question

Why many command not workin actually,

how admin do connect itself ?
thx =)

banned

been banned... how to fix?
please help i was just using multiple names..

Persistent stats

Stats seem to reset when I restart my server. Is there a way we can make them persist?

iPad: Chat input disappears behind keypad when I begin typing

You can reproduce this issue if you follow these steps:

  1. Tap on the chat input in a channel. The cursor is placed in the textarea and the keypad then appears on the screen. The textarea is displayed directly above the keypad at this point
  2. Begin typing in the textarea

You'll notice the textarea disappears behind the keypad. The textarea is still on the page but you can't see what you are typing

Is there a way to specify my nick-name in the URL?

For bookmarking chats it would be cool if I could include my nick-name in a request parameter. It would also make it automatic to reconnect on browser launch (instead of confirming the nick-name popup). I tried to but am not used to reading the hack.chat code enough to tell by myself... If it's not there, you could also point me to where such a thing could be put and I could try it.

theme

新建文本文档 (2).txt
I'm a high school student...I've created a new theme Fresh-Green,(It was suggested by someone else,I don't know how to name it),made for some who like fresh colors。And,There was a problem with my computer last time,MinusGix submitted the subject for me(android-white), thank him for me,thank you.

get user data by payload

I'm trying to get user data by the payload command example /unban user

i want the user one

i know when this is require by the exports run we can simply do data.ip or something else but it's not working with the payload

do something exist to connect nickname to a user object ?

ERR_INVALID_REDIRECT or other odd browser behavior

With commit f28e65a there is an issue, on Windows, with loading the development environment in the browser. This is caused by a bug that exists in the http-server package used by the development environment. http-party/http-server#525

The best work around is to load the page by changing the url from:
http://127.0.0.1:3000/
to:
http://127.0.0.1:3000/index.html

Everything will then work as normal. It should also be noted that http-server is not intended to be used in a live production environment. The client html should be served by a real web server such as Nginx or Apache.

This has been a known issue for well over half a year with this package, with no fixes. I've decided to leave it updated and will be actively looking for a decent replacement.

Document output

  1. The templateCommand.js script might need additional documentation for things such as which values the "cmd" field takes. Currently it only has "info" as a template value; yet I saw other values being use for "cmd", such as "warn".
  2. Only what is to be sent is documented on my PR, not what the server might send back such as warns for taken nicknames or new mods being added. I could add it but I'm unsure of the specifics of server.reply and server.broadcast (like when filter is set to {'uType': 'mod'}). I only have a vague understanding and don't want to spend 4 hours on a completely incorrect PR.

change black color

Hi, your chat is almost perfect but i need to change background color from black to white using url, by example https://hack.chat/?ppbpiaja&c=w

c=w change background color to white

can you implements this changes on hack.chat ? i'm not programmer.

Thanks in advance

Translating text strings

Is it possible to translate the text strings used? They are all in the English language currently

Sorry but more question ^^"

How can send this ?

{ "cmd": "join", "channel": "programming", "nick": "john#doe" }

i've try by post on the url but it's not working, any idea ? and i don't know what you mean bu dev console

thx in advance

Why not use username from localStorage ?

Username seems to be stored in localStorage but not used.
Why not use it to avoid prompting the user each time you’re going in a chatroom (or refreshing the page) ?

A button in the sidebar to clear the username from localStorage could be useful if you want to change identity.

I could work on that feature and submit a PR if you’re ok with it.

allow website embed

i tried to embed hack.chat on btcjua.com for allowing community to chat.

can we define someone username in java script itself ? cause that popup is conflict with site UI.

thanks i will try to edit the code and improve myself, but your help is thanked

FrontPage TypeError

After 1ed6cf9 the front page halts with error:

TypeError: myNick is undefined client.js:172:1

or

Uncaught TypeError: Cannot read property 'split' of undefined client.js:172

This is due to line 63 when the localStorage hasn't been populated.

Broken Link

The Rick-Rolling link on the bottom of README.md is broken

Client needs a little adjust in @media

There's a little problem with the @media break at the main site.

Narrow window, OK, the nicknames appear inline:

narrow

Wide window, also OK, nicknames appear at the side:

wide

The problem appears at an intermediate size:

intermediate

问一个搭建中遇到的问题

client.js 314行报错
var protocol = location.protocol === 'https:' ? 'wss:' : 'ws:'
// if you changed the port during the server config, change 'wsPath'
// to the new port (example: ':8080')
// if you are reverse proxying, change 'wsPath' to the new location
// (example: '/chat-ws')
//var wsPath = ':6060';
var wsPath = ':3000';
ws = new WebSocket(protocol + '//' + document.domain + wsPath);

这里默认是6060,但这里报错
client.js:314 WebSocket connection to 'ws://49.235.196.190:3000/' failed: Error during WebSocket handshake: Unexpected response code: 200
请问怎么解决呢?
按照官方的文档搭建,就会遇到这个错误

localhost and example.com aren't separate

My local server is a complete clone of what I'm running remotely.

If I join the ?meta channel as "Ted" on my localhost machine and join the same channel as "Tom" but this time on my remote server, I see messages show up in both sites when I post.

Handling: Socket warnings/errors

I believe it's a goal to eventually give each error/warning a specific identifier so that they can be more easily detected properly by clients. (I'll be calling these 'errors', but I refer to warnings/errors)
The first solution that popped into my head is to have a counter that each module then increments, and uses that value as an id for one of their warnings. This, would not work as it makes error numbers dependent on when they're added (so different module loading order = different values), and if a new error is added to a module then it will shift every module error after it.

The second idea I had was to supply some simple function that takes in an identifier (short?), and you can ask it for the next identifier. Such as:

let error = {};
export function init (core) {
    let idc = createIDCounter('join');
    error.invalid_nickname = idc.next();
    error.not_admin = idc.next();
    error.nickname_taken = idc.next();
}

Which would then be used like:

server.reply({
    cmd: 'warn',
    error: error.nickname_taken,
}, socket)};

And, nickname_taken === ['join', 2].
So whenever you add a new error, you have to (well we can't enforce it, but it's a 'should only') add it to the end, and it's per module. Though, it has the downside that it has to pass a small string along.
You could probably automatically assign Error ids based on filename (so some number generated from it?), but the string is probably easier and more clear.
Thoughts?

Some commands without arguments throws error

If you were to type just /whisper into the chat you would get an error back from the server of: Hook failure, 'in', 'chat': TypeError: Cannot read property 'replace' of undefined This also affects /nick but only the version currently running on the server (the one on github doesn't have a /nick version, only a command version which you'd have to manually send which works fine)

This is due to https://github.com/hack-chat/main/blob/master/server/src/commands/core/whisper.js#L88 not checking if that part of the input actually exists (due to it being undefined if you don't put any spaces).
Easy fix, will make PR to fix it in a short time.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.