Skip to content

unchatbar/unchatbar-data-chat

Repository files navigation

Unchatbar Data Chat

Build Status

data chat

Requirements

  • Node.js 0.10+
  • Chrome 26+ or Firefox 23+

Installation

  • Install Bower: npm install -g bower
  • Install Gunt CLI: npm install -g grunt-cli
  • Clone repository git clone git://github.com/unchatbar/unchatbar.git
  • Run npm install to install required Node.js modules
  • Run bower install to install required Bower components

Dependencies

  • angular
  • json3
  • es5-shim
  • bootstrap-css-only
  • ngstorage
  • lodash
  • unchatbar-connection
  • luegg.directives
  • dexie

Get Started

angular.module('app', ['unchatbar-data-chat'])

configure route see below

Configure

API

  • send message to users from channel
Message.send([PEERID],[TEXT-MESAGE],[CHANNEL]);
  • get all message's from channel
Message.getMessageFromChannel();
  • get all unread message's
Message.getUnreadMessageMap();

Directive

  • message box (list of all messages in channel and send from)
<un-data-chat-message-box data-custom-template-url="[CUSTOM-TEMPLATEPATH]" data-channel="{{[CHANNELNAME]}}" data-user-map="[USERLIST IN CHANNEL]"></un-data-chat-message-box>
  • output unread message
<un-data-chat-unread-message data-custom-template-url="[CUSTOM-TEMPLATEPATH]" data-user-map="[USERLIST IN CHANNEL]"></un-data-chat-unread-message>
  • output count of unread message
<un-data-chat-count-unread-message data-custom-template-url="[CUSTOM-TEMPLATEPATH]"></un-data-chat-count-unread-message>

Events

  • MessageUpdateReadMessage: add new read message
  • MessageUpdateUnreadMessage: add new unread message (contains unread : unread message )