Git Product home page Git Product logo

canop / miaou Goto Github PK

View Code? Open in Web Editor NEW
538.0 27.0 73.0 20.32 MB

A chat server with OAuth2 authentication, persistent and searchable history, video and audio, markdown formatting, private and public rooms, stars, votes, embedded games, and many other features

Home Page: http://miaou.dystroy.org/

License: Other

Shell 0.05% JavaScript 76.52% CSS 0.46% HTML 0.97% Puppet 0.17% PLpgSQL 0.57% Dockerfile 0.05% SCSS 16.09% Pug 5.13%
chat javascript nodejs svg redis postgresql

miaou's Introduction

Miaou

A chat server with authentication, persistent and searchable history, rich markdown formatting, video, private rooms, conversation highlighting, plugins, persisted notifications, code and table rendering, specialized link boxing, github hooks, bots, and many other features.

screenshot

Chat on Miaou Chat on Miaou

Introduction/Gallery

You can see it in action or use it on https://miaou.dystroy.org (anybody can create a room for public or private use on this server).

Installing a server

If you want to install Miaou, the installation documentation is available here.

Don't hesitate to come ask us some advices in one of the dedicated chat rooms Chat on Miaou and Chat on Miaou (please note that they're currently more active between 8 and 19 GMT).

And if you run your own server, please tell us, we're always happy to learn about installations.

Contributing

As described in the help, Miaou is mostly coded in JavaScript.

Stuff includes node, PostgreSQL, OAuth2, socket.io, WebRTC, express, Bluebird, Redis, Pug, Passport.js, hu.js, jQuery, sass/scss, Uglify-js, gulp, jest, travis-ci, and nginx.

Many features are implemented as plugins, and that's where you should look first: Plugin developpement.

If you have the ability and will to contribute, come and discuss with us. The best landing place is usually the Miaou room where you can ping @dystroy or @Florian.

Help is welcome but remember:

  1. Come and discuss with us before to code
  2. And, always test yourself and run the test suite before doing a pull request.

License

Most of Miaou follows the MIT License. Exceptions are specified here.

Copyright (c) 2014 Denys Séguret <https://www.dystroy.org/>

miaou's People

Contributors

adriann avatar canop avatar ckln avatar erk3 avatar fireprawn avatar gnu-sauvage avatar jean-moulinette avatar kw-andy avatar minitech avatar oliboy50 avatar ralt avatar rlemon avatar sladix avatar stargateur avatar steamwind avatar tckmn avatar thomas-daniels avatar vigneshmurugan avatar yugalxd avatar zirak 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

miaou's Issues

TOTP?

Is there a simple way to implement login for this using passport-totp? I just need to have a static set of users that I would like to have with TOTP and not using any external oauth server. Basically I just need to have a chat that has a login with user/password/totp.... Similar to the IP-based, but instead with TOTP. The users will be static and I can just hardcode them and their keys into JS. Thoughts?

Install instructions for OAuth are unclear

Hi, I am having a hard time setting this up with Google Oauth - I can get the initial page to load, but when clicking the button to log in with Google, it's redirecting me to a blank white page. What am I missing here? I do have the API keys set up with Google.

Add option to disable changing the favicon on activity

The problem is that google chrome updates the favicon in the bookmarks bar when the tab updates. So even if you have miaou's tab pinned somewhere, you're easily distracted from work if your bookmark icons suddenly change colors.

vagrant setup definitely doesn't work on windows

while provisioning (vagrant up for the first time), the script errors:

default: /vagrant => C:/Projects/Miaou
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

chown `id -u vagrant`:`id -g vagrant` /vagrant

Stdout from the command:



Stderr from the command:

stdin: is not a tty
chown: changing ownership of `/vagrant': Not a directory

The provisioning ends there abruptly.

Using Windows 10 & Mingw32

Can't set property 'provider' of undefined

When I try to login to miaou on dystroy using Stack Exchange, I get this issue:

TypeError: Cannot set property 'provider' of undefined

  • at Gunzip. (/redacted/passport-stackexchange.js:38:18)
  • at emitNone (events.js:72:20)
  • at Gunzip.emit (events.js:166:7)
  • at endReadableNT (_stream_readable.js:889:12)
  • at doNTCallback2 (node.js:430:9)
    - at process._tickCallback (node.js:344:17)

I don't know where to send issues like this, so sub question: where to send issues with miaou on the dystroy server?

UTF-8 not supported in user names

When logging in from a Stack Exchange profile (where my name is "André"), here is what I got on profile page :

Screenshot

Also, when trying to manually enter my name (with the "é" character) it doesn't validate.

Don't scroll down while I'm reading up

Right now, when someone posts a message it would automatically scroll down to the bottom of the page. That makes it impossible to read up the transcript.

Scroll should only happen if I'm already at the bottom of the page when the message gets issued.

[Meta] TODO list

I think the todo list, currently "managed" in a miaou message, should be in a list of issues on github, or something more manageable. I propose github issues since the tool is already there :)

It would allow:

  • a searchable list (github issues have: labels, search by labels, search by closed, etc)
  • a way to assign items to someone
  • a way to discuss these items
  • something to reference to in the commits
  • a way for people to propose new items, and being able to decline/accept them asynchronously (i.e. not in the chat)
  • a way for people to choose something to contribute to (labels like "easy" could be added for people who want to start contributing)

Thoughts? I can translate the current todo list in github issues if you're lazy. Sure, that'd give a lot of issues, but at least it wouldn't be as volatile as the current way (a miaou message you manually maintain), and it would allow many more ways (shown above) to work.

How to change presentation layer?

Hello,

While miaou is excellent in functionalities, the presentation layer is just awful. To me it looks so 2004 and convoluted.
I just wanted to change the background color of a theme but got lost in myriad of scss files hidden behind crappy jade templates (sorry that's my opinion).
So I'm wondering how can I just get rid of all these shenanigans and use a more straightforward approach like handlebar/css for presentation layer? What is the least cumbersome what to do that?

Chat is empty when using ghostery or darkreader

The site load but all is empty for if any of darkreader or ghosterry are enable, console log when open https://miaou.dystroy.org/3490?broot:

jQuery.Deferred exception: skin.stringToColour is not a function r@https://miaou.dystroy.org/static/miaou.min.js?v=56:1:62285
md.addMessage@https://miaou.dystroy.org/static/miaou.min.js?v=56:1:69724
chat.messagesIn/<@https://miaou.dystroy.org/static/miaou.min.js?v=56:1:10760
chat.messagesIn@https://miaou.dystroy.org/static/miaou.min.js?v=56:1:10580
chat.start@https://miaou.dystroy.org/static/miaou.min.js?v=56:1:11562
@https://miaou.dystroy.org/static/pad.min.js?v=04:1:2183
miaou/<@https://miaou.dystroy.org/static/miaou.min.js?v=56:1:34
l@https://miaou.dystroy.org/static/jquery-3.3.1.min.js:2:29375
a/</c<@https://miaou.dystroy.org/static/jquery-3.3.1.min.js:2:29677
 undefined

Uncaught TypeError: skin.stringToColour is not a function
    r https://miaou.dystroy.org/static/miaou.min.js?v=56:1
    addMessage https://miaou.dystroy.org/static/miaou.min.js?v=56:1
    messagesIn https://miaou.dystroy.org/static/miaou.min.js?v=56:1
    messagesIn https://miaou.dystroy.org/static/miaou.min.js?v=56:1
    start https://miaou.dystroy.org/static/miaou.min.js?v=56:1
    <anonymous> https://miaou.dystroy.org/static/pad.min.js?v=04:1
    miaou https://miaou.dystroy.org/static/miaou.min.js?v=56:1
    jQuery 2
        l
        c

Uncaught TypeError: skin.stringToColour is not a function
    r https://miaou.dystroy.org/static/miaou.min.js?v=56:1
    addMessage https://miaou.dystroy.org/static/miaou.min.js?v=56:1
    messagesIn https://miaou.dystroy.org/static/miaou.min.js?v=56:1
    messagesIn https://miaou.dystroy.org/static/miaou.min.js?v=56:1
    emit https://miaou.dystroy.org/socket.io/socket.io.js:6
    onevent https://miaou.dystroy.org/socket.io/socket.io.js:8
    onpacket https://miaou.dystroy.org/socket.io/socket.io.js:8
    exports https://miaou.dystroy.org/socket.io/socket.io.js:8
    emit https://miaou.dystroy.org/socket.io/socket.io.js:6
    ondecoded https://miaou.dystroy.org/socket.io/socket.io.js:6
    exports https://miaou.dystroy.org/socket.io/socket.io.js:8
    emit https://miaou.dystroy.org/socket.io/socket.io.js:6
    add https://miaou.dystroy.org/socket.io/socket.io.js:6
    ondata https://miaou.dystroy.org/socket.io/socket.io.js:6
    exports https://miaou.dystroy.org/socket.io/socket.io.js:8
    emit https://miaou.dystroy.org/socket.io/socket.io.js:6
    onPacket https://miaou.dystroy.org/socket.io/socket.io.js:6
    setTransport https://miaou.dystroy.org/socket.io/socket.io.js:6
    emit https://miaou.dystroy.org/socket.io/socket.io.js:6
    onPacket https://miaou.dystroy.org/socket.io/socket.io.js:7
    onData https://miaou.dystroy.org/socket.io/socket.io.js:7
    onmessage https://miaou.dystroy.org/socket.io/socket.io.js:8

miaou.min.js:1:62285
    r https://miaou.dystroy.org/static/miaou.min.js?v=56:1
    addMessage https://miaou.dystroy.org/static/miaou.min.js?v=56:1
    messagesIn https://miaou.dystroy.org/static/miaou.min.js?v=56:1
    forEach self-hosted:225
    messagesIn https://miaou.dystroy.org/static/miaou.min.js?v=56:1
    emit https://miaou.dystroy.org/socket.io/socket.io.js:6
    onevent https://miaou.dystroy.org/socket.io/socket.io.js:8
    onpacket https://miaou.dystroy.org/socket.io/socket.io.js:8
    exports https://miaou.dystroy.org/socket.io/socket.io.js:8
    emit https://miaou.dystroy.org/socket.io/socket.io.js:6
    ondecoded https://miaou.dystroy.org/socket.io/socket.io.js:6
    exports https://miaou.dystroy.org/socket.io/socket.io.js:8
    emit https://miaou.dystroy.org/socket.io/socket.io.js:6
    add https://miaou.dystroy.org/socket.io/socket.io.js:6
    ondata https://miaou.dystroy.org/socket.io/socket.io.js:6
    exports https://miaou.dystroy.org/socket.io/socket.io.js:8
    emit https://miaou.dystroy.org/socket.io/socket.io.js:6
    onPacket https://miaou.dystroy.org/socket.io/socket.io.js:6
    setTransport https://miaou.dystroy.org/socket.io/socket.io.js:6
    emit https://miaou.dystroy.org/socket.io/socket.io.js:6
    onPacket https://miaou.dystroy.org/socket.io/socket.io.js:7
    onData https://miaou.dystroy.org/socket.io/socket.io.js:7
    onmessage https://miaou.dystroy.org/socket.io/socket.io.js:8

Uncaught DOMException: CSSStyleSheet.rules getter: Not allowed to access cross-origin stylesheet miaou.min.js:1
    getCssValue https://miaou.dystroy.org/static/miaou.min.js?v=56:1
    <anonyme> https://miaou.dystroy.org/static/miaou.min.js?v=56:1
    miaou https://miaou.dystroy.org/static/miaou.min.js?v=56:1
    jQuery 2

Some cookies are misusing the recommended “sameSite“ attribute 2
Cookie “io” will be soon rejected because it has the “sameSite” attribute set to “none” or an invalid value, without the “secure” attribute. To know more about the “sameSite“ attribute, read https://developer.mozilla.org/docs/Web/HTTP/Headers/Set-Cookie/SameSite socket.io
Cookie “io” will be soon rejected because it has the “sameSite” attribute set to “none” or an invalid value, without the “secure” attribute. To know more about the “sameSite“ attribute, read https://developer.mozilla.org/docs/Web/HTTP/Headers/Set-Cookie/SameSite socket.io

Firefox: 79.0 (64-bit)

Error log look the same for the two extensions when enable.

Error: No Row (room)

Hi,
I have a new installation with node 9.3. I have imported schema to postgresql 9.5 from the default postgres-creation.sql. After authentication however, user gets this error:

An error occured

Error: No Row

Apparently there is no room to join:

miaou=> \dt
List of relations

Schema |        Name        | Type  | Owner 
--------+--------------------+-------+-------
public | access_request     | table | miaou
public | ban                | table | miaou
public | db_version         | table | miaou
public | message            | table | miaou
public | message_vote       | table | miaou
public | ping               | table | miaou
public | player             | table | miaou
public | player_name_change | table | miaou
public | plugin_player_info | table | miaou
public | pref               | table | miaou
public | room               | table | miaou
public | room_auth          | table | miaou
public | room_tag           | table | miaou
public | scm_hook           | table | miaou
public | scm_hook_room      | table | miaou
public | survey_vote        | table | miaou
public | tag                | table | miaou
public | watch              | table | miaou
(18 rows)


miaou=> SELECT * from room;
id | name | private | listed | dialog | lang | img | description 
----+------+---------+--------+--------+------+-----+-------------
(0 rows)

The error stack:

From previous event:
    at /home/me/miaou/libs/server.js:25:3
    at pass (/home/me/miaou/node_modules/passport/lib/authenticator.js:357:9)
    at Authenticator.deserializeUser (/home/me/miaou/node_modules/passport/lib/authenticator.js:362:5)
    at SessionStrategy.authenticate (/home/me/miaou/node_modules/passport/lib/strategies/session.js:60:10)
    at attempt (/home/me/miaou/node_modules/passport/lib/middleware/authenticate.js:361:16)
    at authenticate (/home/me/miaou/node_modules/passport/lib/middleware/authenticate.js:362:7)
    at Layer.handle [as handle_request] (/home/me/miaou/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/home/me/miaou/node_modules/express/lib/router/index.js:317:13)
    at /home/me/miaou/node_modules/express/lib/router/index.js:284:7
    at Function.process_params (/home/me/miaou/node_modules/express/lib/router/index.js:335:12)
    at next (/home/me/miaou/node_modules/express/lib/router/index.js:275:10)
    at initialize (/home/me/miaou/node_modules/passport/lib/middleware/initialize.js:53:5)
    at Layer.handle [as handle_request] (/home/me/miaou/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/home/me/miaou/node_modules/express/lib/router/index.js:317:13)
    at /home/me/miaou/node_modules/express/lib/router/index.js:284:7
    at Function.process_params (/home/me/miaou/node_modules/express/lib/router/index.js:335:12)
    at next (/home/me/miaou/node_modules/express/lib/router/index.js:275:10)
    at /home/me/miaou/node_modules/express-session/index.js:489:7
    at Command.callback (/home/me/miaou/node_modules/connect-redis/lib/connect-redis.js:167:14) message: 'No Row' }
Unexpectedly Missing Row in
select id, name, img, description, private, listed, dialog, lang, auth, (select array(select tag from room_tag where room=689)) as tags from room left join room_auth a on a.room=room.id and a.player=4 where room.id=689

How to fix this?
Thanks in advance.

Miaou room text is empty

Since ~1 week, maybe since Firefox 75, my room text is empty. I have this in browser console:

12:01:28,315 merged preferences: 
Object { "connecticats.list": "none", connot: "yes", datdpl: "always", fun: "normal", mclean: "300", "mountyhall.trollVisible": "salles-MH", "mountyhall.url": "auto", nifvis: "no", notif: "on_ping", otowat: "on_visit", … }
miaou.min.js:1:81443
12:01:28,368 wppref: disabled miaou.min.js:1:90965
12:01:28,936 starting miaou.min.js:1:227529
12:01:28,944 Slow mdStringToHtml. Duration= 3 text: [MH] Vous êtes invités dans la grande roulotte du camp des Nouchs. miaou.min.js:1:37701
12:01:28,952 jQuery.Deferred exception: skin.stringToColour is not a function r@https://miaou.dystroy.org/static/miaou.min.js?v=56:1:62285
md.addMessage@https://miaou.dystroy.org/static/miaou.min.js?v=56:1:69724
chat.messagesIn/<@https://miaou.dystroy.org/static/miaou.min.js?v=56:1:10760
chat.messagesIn@https://miaou.dystroy.org/static/miaou.min.js?v=56:1:10580
chat.start@https://miaou.dystroy.org/static/miaou.min.js?v=56:1:11562
@https://miaou.dystroy.org/static/pad.min.js?v=04:1:2183
miaou/<@https://miaou.dystroy.org/static/miaou.min.js?v=56:1:34
l@https://miaou.dystroy.org/static/jquery-3.3.1.min.js:2:29375
a/</c<@https://miaou.dystroy.org/static/jquery-3.3.1.min.js:2:29677
 undefined jquery-3.3.1.min.js:2:30930
12:01:28,980
SecurityError: CSSStyleSheet.rules getter: Not allowed to access cross-origin stylesheet miaou.min.js:1
12:01:28,985
SecurityError: CSSStyleSheet.rules getter: Not allowed to access cross-origin stylesheet miaou.min.js:1
12:01:28,987
TypeError: skin.stringToColour is not a function
miaou.min.js:1:62285
12:01:29,352 <- ready miaou.min.js:1:105403
12:01:29,356 -> enter 
Object { roomId: 431, nbEntries: 0, tzoffset: -120 }
miaou.min.js:1:105157
12:01:29,488
TypeError: skin.stringToColour is not a function
miaou.min.js:1:62285
12:01:29,705 recent_users: 
Array(47) [ {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, … ]
miaou.min.js:1:108015
12:01:29,727 trigger ready miaou.min.js:1:106871
12:01:29,815 room trolls: null miaou.min.js:1:221499

Is there anything I can do?

Error migration database patch 25-30

After run psql -U miaou -d miaou -a -f sql/postgres.creation.sql when I launch ./start I get an error:

DB query error in raw_statement
utilisation non sûre de la nouvelle valeur « member » du type enum auth_level
update room_auth set auth='member' where auth='write'
An error prevented DB upgrade :  error: utilisation non sûre de la nouvelle valeur « member » du type enum auth_level
    at Connection.parseE (/home/stargateur/miaou/node_modules/pg/lib/connection.js:614:13)
    at Connection.parseMessage (/home/stargateur/miaou/node_modules/pg/lib/connection.js:413:19)
    at Socket.<anonymous> (/home/stargateur/miaou/node_modules/pg/lib/connection.js:129:22)
    at Socket.emit (events.js:315:20)
    at addChunk (_stream_readable.js:295:12)
    at readableAddChunk (_stream_readable.js:271:9)
    at Socket.Readable.push (_stream_readable.js:212:10)
    at TCP.onStreamRead (internal/stream_base_commons.js:186:23)
From previous event:
    at Con.proto._query (/home/stargateur/miaou/libs/db.js:1413:9)
    at Con.proto.executeRaw (/home/stargateur/miaou/libs/db.js:1443:14)
    at Con.<anonymous> (/home/stargateur/miaou/libs/db.js:1268:17)
    at FSReqCallback.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:63:3)
From previous event:
    at Con.<anonymous> (/home/stargateur/miaou/libs/db.js:1266:6)
From previous event:
    at Con.<anonymous> (/home/stargateur/miaou/libs/db.js:1257:4)
    at FSReqCallback.oncomplete (fs.js:155:23)
From previous event:
    at Object.exports.upgrade (/home/stargateur/miaou/libs/db.js:1251:3)
    at /home/stargateur/miaou/libs/db.js:1342:18
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async Object.exports.start (/home/stargateur/miaou/libs/server.js:243:2) {
  length: 243,
  severity: 'ERREUR',
  code: '55P04',
  detail: undefined,
  hint: 'Les nouvelles valeurs enum doivent être validées (COMMIT) avant de pouvoir être utilisées.',
  position: '27',
  internalPosition: undefined,
  internalQuery: undefined,
  where: undefined,
  schema: undefined,
  table: undefined,
  column: undefined,
  dataType: undefined,
  constraint: undefined,
  file: 'enum.c',
  line: '98',
  routine: 'check_safe_enum_use'
}
All changes are rollbacked

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.