Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
denshobato_chat_panel
Advanced tools
DenshobatoChatPanel, is a official addon for Denshobato Gem, it provides simple chat panel for you. If you don't need any special customization for dialog panel, or if you want to try messaging quickly, you can use chat panel.
Add this line to your application's Gemfile:
gem 'denshobato_chat_panel'
And then execute:
$ bundle
Or install it yourself as:
$ gem install denshobato_chat_panel
rails g denshobato_chat_panel:install
This command copies assets to vendor/public/assets
#####1. Add method denshobato_chat_panel
to your model
class Customer < ActiveRecord::Base
denshobato_for :customer
denshobato_chat_panel
end
#####2. Copy this line to your config/initializers/assets.rb
Rails.application.config.assets.precompile += %w( denshobato.js )
#####3. In your application.scss import css
@import 'denshobato';
#####4. In layouts/application.erb
include javascript file in the bottom
<body>
<div class='container'>
<%= render 'layouts/header' %>
<%= yield %>
</div>
<%= javascript_include_tag 'denshobato' %>
</body>
#####5. Mount API route in your routes.rb
mount Denshobato::DenshobatoApi => '/'
#####6. On the page with your conversation, e.g localhost:3000/conversation/32
, add this helper with arguments
= render_denshobato_messages(@conversation, current_user)
// => When @conversation = Denshobato::Conversation.find(params[:id])
// => and current_user is your signed in user, e.g Devise current_user etc.
You need to set up name and image for chat independently. By default, name show a class name of model, e.g Customer, or User, and a gravatar.
Go to your user model and rewrite these methods.
class User < ActiveRecord::Base
denshobato_for :user
denshobato_chat_panel
def full_name
"#{first_name}, #{last_name}"
end
def image
avatar.url
end
end
Bug reports and pull requests are welcome on GitHub at https://github.com/ID25/denshobato_chat_panel.
The gem is available as open source under the terms of the MIT License.
Copyright (c) 2016 Eugene Domosedov (ID25)
FAQs
Unknown package
We found that denshobato_chat_panel demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.