hack-chat / main Goto Github PK
View Code? Open in Web Editor NEWa minimal, distraction-free chat application
Home Page: https://hack.chat/
a minimal, distraction-free chat application
Home Page: https://hack.chat/
been banned... how to fix?
please help i was just using multiple names..
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.
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
When I use the "Clear messages" button, messages are cleared but the channel name and participant list at the top of the page also disappear
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.
my suggestion each new client creates a private and public key and share the public key after this encrypt every message.
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.
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 ?
新建文本文档 (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.
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?
On the right hand side I see my own name in the invite list. Is this a bug? Clicking on my name seems to do nothing
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"
.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.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
after install with the guide in https://github.com/hack-chat/main/blob/master/documentation/DEPLOY.md
it shows " Upgrade Required" on the website
I want to change the port ( 3000 actually ) to onother one, do you know can I change it ?
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?
Add support for Matrix protocol. Here is corresponding issue on their side: turt2live/matrix-wishlist#311.
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.
Stats seem to reset when I restart my server. Is there a way we can make them persist?
my-nick
in local storage usually contains the user's nickname only but if the user is using a trip code, my-nick
will reveal the sensitive word. For example Jane#password
This may cause a problem if the user is using a public computer.
Does my-nick
need to be stored locally?
Shortening '/whisper' to something else: -> Vote here & don't cheat -.- <-
I assume some of the options are out of the questions cuz server.js and other stuff I'm ignorant of, there's a poll, but I'll list the options anyways:
i mean its more general and its just better i think
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
Why many command not workin actually,
how admin do connect itself ?
thx =)
I mean moving the whole project. Or linking it here. I don't know how it's done.
When I run a changenick command, my nick in local storage isn't updated.
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:
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
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.
The Rick-Rolling link on the bottom of README.md is broken
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
请问怎么解决呢?
按照官方的文档搭建,就会遇到这个错误
Daily announcements can be added, individual users are prohibited from speaking, and all are prohibited from speaking.
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.
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.
Created a docker container for hacker chat with support for reverse proxying with ssl. Sharing is caring.
There's a little problem with the @media break at the main site.
Narrow window, OK, the nicknames appear inline:
Wide window, also OK, nicknames appear at the side:
The problem appears at an intermediate size:
FIX THE FUCKING MOBILE CSS
The link on the client html https://goo.gl/qasdSu
needs to be removed as the app no longer exists.
Hi,
It would be nice to use https://hack.chat/meta instead of https://hack.chat/?meta. This would need a URL rewrite. Can I submit a feature request?
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.
You can reproduce this issue if you follow these steps:
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
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:
(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.findSockets
would need to have specialization for a specific key, when it's currently super generic.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.
latex...ewww
When I run a move command, the URL in the browser address bar doesn't change. I still see the name of the old channel which can be slightly confusing
Hey there, KaTeX maintainer here. Not really an issue. I'd like to ask if hack.chat would mind adding your logo to KaTeX user list? (KaTeX/KaTeX#1569, preview availabe at https://deploy-preview-1569--katex.netlify.com/en/users.html) This is a really cool project! 😄
Is it possible to translate the text strings used? They are all in the English language currently
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.