Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some updates #62

Open
wants to merge 31 commits into
base: master
Choose a base branch
from
Open

Some updates #62

wants to merge 31 commits into from

Conversation

yamaha252
Copy link

@yamaha252 yamaha252 commented Dec 8, 2018

Hello! Thanks for amazing service!
I did some improvements for it and I wanted to send a few pull requests for different features but now there are a lot of changes and it's too difficult to split they :-\

Changes:

  • It's dockerized to easy setup. Some improvements to build fast and get lightweight container.
  • No broadcasting standard messages to all users. I think it's dangerous and would be useful for people to speak in a group for better support process.
  • Offline messaging. Messages are just stored in the memory. The support can reply to a user if they went offline. They will receive it after come back.
  • Online and offline modes to hide and show chat widget.
  • Additional commands:
    -- /all [any_text] - Send message to all online users
    -- /who - Get users list who are online now
    -- /online - Set online status for the chat. Widget is shown for users
    -- /offline - Set offline status for the chat. Widget is hidden for users
    -- /ban [name] - Ban user
    -- /unban [name] - Unban user
  • Humanize random user names to be easy to remember (Using a good small human-readable-ids package)
  • A bot notification about coming user back to a chat. It might be useful for support.
  • Some small fixes and visual improvements: fix sender's name, refactoring styles, support line breaks, prevent sending empty messages etc.
  • Ban users

The changes should be additional tested. Especially on mobile devices.

TODO:

  • To think to avoid many system messages about offline and online statuses of users who don't write anymore.
  • Keep some data in a small file database like lowdb? (chat states, offline messages)
  • A new message indicator.
  • Don't reload (rerender, reconect) the chat widget when opening and keep the connection if it was opened once before page reloading.

@idoco
Copy link
Owner

idoco commented Dec 9, 2018

Thanks @yamaha252! Looks like an awesome contribution.

Since it is pretty massive it will take me some time to review it. Hopefully I can get to it this week.

@Bramzor
Copy link

Bramzor commented Jun 4, 2019

@idoco: Any possibility to get this one accepted? If you want I can review/test it for you. I really love your product but seems a lot of the files are 2years old so I'm wondering how the support is. I can understand that you do not have a lot of time available, but I'm willing to help if needed.

@idoco
Copy link
Owner

idoco commented Jun 6, 2019

Hi @Bramzor, sorry for the slow response. I really appreciate you taking the time to contribute to this project; this is never obvious. I'd really love to accept this change, the problem is that never had enough time to test it.

The hosted version of Intergram is embedded in hundreds for websites and is being loaded by millions of users every week! My biggest concern is harming any of these hosting websites, and this is why I take merging pull requests so seriously.

Intergram is sort of my weekend project, but lately, I didn't have much time for it. I hope to get to this sometime this month, but in the meantime, the best thing I can offer is to host your version. I hope you understand.

@Bramzor
Copy link

Bramzor commented Jun 6, 2019

Hi @idoco, I understand your concerns that you do not want to break things. Maybe it can be a solution to start branches and different versions so it wouldn't change anything for people currently using it but a beta branch would still be able to progress.
I will be using the fork of yamaha right now as it has many updates but this is not really the correct way because if I also want to use another pull request, I will have to start creating my own forks and combine different pull requests.

@yamaha252
Copy link
Author

yamaha252 commented Jun 6, 2019

Guys, we use this changes on production all this year and the service was fully tested of our qa team. Don't worry to try them.
There are no breaking changes except broadcasting messages and changed z-index (I think it should be changed by custom styles if it's needed when integrate the script)

@mkrasselt1
Copy link

any chance on this getting merged soon soon ?

@nosovk
Copy link

nosovk commented Sep 1, 2021

hopw someday we will see it in a master

@yoweeking
Copy link

Hi yamaha252, I'm loving your updates done and thank you for them. I was wondering if you were able to provide some advice on how I might be able to enable sending images and small attachments? It seems like you have a lot more experience and knowledge in this space and will appreciate any advice you have, I'm happy to contribute if I manage to include that functionality :)

@yamaha252
Copy link
Author

yamaha252 commented Apr 25, 2022

@yoweeking It should be not so difficult, telegram has a good api to send files.
https://core.telegram.org/bots/api#sending-files

It's possible to upload directly to telegram servers or using your own server to keep files and send it to the bot as a link.
Just need to add a new endpoint to server.js for uploading files and sending messages to the bot.
The difficult thing is a user UI for uploading files and previewing images a user sent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants