intergram icon indicating copy to clipboard operation
intergram copied to clipboard

Some updates

Open yamaha252 opened this issue 6 years ago • 9 comments

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.

yamaha252 avatar Dec 08 '18 17:12 yamaha252

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.

idoco avatar Dec 09 '18 08:12 idoco

@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.

Bramzor avatar Jun 04 '19 19:06 Bramzor

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.

idoco avatar Jun 06 '19 13:06 idoco

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.

Bramzor avatar Jun 06 '19 13:06 Bramzor

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)

yamaha252 avatar Jun 06 '19 18:06 yamaha252

any chance on this getting merged soon soon ?

mkrasselt1 avatar Aug 11 '21 12:08 mkrasselt1

hopw someday we will see it in a master

nosovk avatar Sep 01 '21 21:09 nosovk

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 :)

yoweeking avatar Apr 21 '22 15:04 yoweeking

@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.

yamaha252 avatar Apr 25 '22 12:04 yamaha252