Skip to content

Commit

Permalink
Merge branch 'upstream-merge'
Browse files Browse the repository at this point in the history
Conflicts:
	client/views/app/home.html
  • Loading branch information
rwakida committed Aug 7, 2015
2 parents 4972eae + 0d18b54 commit f39bde1
Show file tree
Hide file tree
Showing 226 changed files with 4,328 additions and 6,382 deletions.
1 change: 1 addition & 0 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,4 @@ paths:
#
exclude_paths:
- "public/moment-locales/*"
- "packages/rocketchat-favico/favico.js"
2 changes: 1 addition & 1 deletion .meteor/cordova-plugins
Original file line number Diff line number Diff line change
@@ -1 +1 @@

com.ionic.keyboard@https://github.com/driftyco/ionic-plugin-keyboard/tarball/66926f5e25fcd71b65799adaf12fa0b2df65ce78
64 changes: 41 additions & 23 deletions .meteor/packages
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,45 @@ jquery
less
meteor-platform
reactive-var
reactive-dict
service-configuration

chrismbeckett:toastr
francocatena:status
iron:router
jparker:gravatar
kevohagan:sweetalert
konecty:autolinker
arunoda:streams
rocketchat:lib

rocketchat:autolinker
rocketchat:emojione
rocketchat:favico
rocketchat:file
rocketchat:highlight
rocketchat:ldap
rocketchat:logger
rocketchat:markdown
rocketchat:me
rocketchat:mentions
rocketchat:oembed
rocketchat:webrtc
#rocketchat:external
#rocketchat:hubot
#rocketchat:irc

konecty:change-case
konecty:delayed-task
konecty:mongo-counter
konecty:multiple-instances-status
konecty:nrr
konecty:user-presence
konecty:[email protected]

cfs:standard-packages
cfs:gridfs
#cfs:filesystem
#cfs:s3
#cfs:dropbox

chrismbeckett:toastr
francocatena:status
jparker:gravatar
kevohagan:sweetalert
meteorhacks:kadira
mizzao:autocomplete
mizzao:timesync
momentjs:moment
Expand All @@ -38,26 +62,20 @@ nooitaf:colors
pauli:accounts-linkedin
percolate:migrations
percolatestudio:synced-cron
pierreeric:rxfavico
raix:handlebar-helpers
rocketchat:autolinker
rocketchat:emojione
rocketchat:file
rocketchat:highlight
rocketchat:hubot
#rocketchat:irc
rocketchat:ldap
rocketchat:lib
rocketchat:markdown
rocketchat:me
rocketchat:mentions
rocketchat:oembed
rocketchat:webrtc
raix:ui-dropped-event
tap:i18n
tmeasday:crypto-md5
tmeasday:errors
todda00:friendly-slugs
underscorestring:underscore.string
yasaricli:slugify
meteorhacks:kadira
eskan:chosen
reactive-dict
yasinuslu:blaze-meta
nimble:restivus
dispatch:run-as-user
kadira:flow-router
kadira:blaze-layout
mystor:device-detection
fastclick
2 changes: 1 addition & 1 deletion .meteor/release
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[email protected].2
[email protected].3
51 changes: 34 additions & 17 deletions .meteor/versions
Original file line number Diff line number Diff line change
Expand Up @@ -14,47 +14,59 @@ [email protected]
[email protected]
[email protected]
[email protected]
cfs:[email protected]
cfs:[email protected]
cfs:[email protected]
cfs:[email protected]
cfs:[email protected]
cfs:[email protected]
cfs:[email protected]
cfs:[email protected]
cfs:[email protected]
cfs:[email protected]
cfs:[email protected]
cfs:[email protected]
cfs:[email protected]
cfs:[email protected]
cfs:[email protected]
cfs:[email protected]
cfs:[email protected]
[email protected]
chrismbeckett:[email protected]
[email protected]
cosmos:[email protected]
dandv:[email protected]
[email protected]
[email protected]
dispatch:[email protected]
[email protected]
[email protected]
eskan:[email protected]
[email protected].0
[email protected].1
[email protected]
francocatena:status@1.2.3
francocatena:status@1.3.0
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
iron:[email protected]
iron:[email protected]
iron:[email protected]
iron:[email protected]
iron:[email protected]
iron:[email protected]
iron:[email protected]
iron:[email protected]
jparker:[email protected]
jparker:[email protected]
jparker:[email protected]
[email protected]_2
[email protected]
kadira:[email protected]
kadira:[email protected]
kevohagan:[email protected]
konecty:[email protected]
konecty:[email protected]
konecty:[email protected]
konecty:[email protected]
konecty:[email protected]
konecty:[email protected]
konecty:[email protected].2
konecty:[email protected].4
[email protected]
[email protected]
[email protected]
Expand All @@ -64,18 +76,20 @@ matb33:[email protected]
[email protected]
[email protected]
[email protected]
meteorhacks:kadira@2.22.0
meteorhacks:kadira@2.23.0
meteorhacks:[email protected]
meteorspark:[email protected]
[email protected]
[email protected]
mizzao:[email protected]
mizzao:[email protected].2
mizzao:[email protected].3
[email protected]
momentjs:[email protected].3
momentjs:[email protected].6
[email protected]
[email protected]
mrt:[email protected]
mystor:[email protected]
nimble:[email protected]
nooitaf:[email protected]
[email protected]_2
[email protected]
Expand All @@ -86,22 +100,23 @@ pauli:[email protected]
pauli:[email protected]
percolate:[email protected]
percolatestudio:[email protected]
pierreeric:[email protected]_1
qnub:[email protected]
raix:[email protected].2
raix:[email protected].3
raix:[email protected]
raix:[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
rocketchat:[email protected]
rocketchat:[email protected]
rocketchat:[email protected]
rocketchat:[email protected]
rocketchat:[email protected]
rocketchat:[email protected]
rocketchat:[email protected]
rocketchat:[email protected]
rocketchat:[email protected]
rocketchat:[email protected]
rocketchat:[email protected]
rocketchat:[email protected]
Expand All @@ -112,6 +127,7 @@ [email protected]
[email protected]
[email protected]
simple:[email protected]
simple:[email protected]
[email protected]
[email protected]
[email protected]
Expand All @@ -129,3 +145,4 @@ [email protected]
[email protected]
[email protected]
yasaricli:[email protected]
yasinuslu:[email protected]
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,13 @@ meteor

## Credits

Thanks to [Diego Sampaio](https://github.com/sampaiodiego), [Gabriel Engel](https://github.com/engelgabriel), [Marcelo Schmidt](https://github.com/marceloschmidt), [Rafael Caferati](https://github.com/rcaferati) e [Rodrigo Nascimento](https://github.com/rodrigok)
Thanks to
[Diego Sampaio](https://github.com/sampaiodiego),
[Gabriel Engel](https://github.com/engelgabriel),
[Marcelo Schmidt](https://github.com/marceloschmidt),
[Rafael Caferati](https://github.com/rcaferati),
[Rodrigo Nascimento](https://github.com/rodrigok),
[Sing Li](https://github.com/Sing-Li)

Emoji provided free by [Emoji One](http://emojione.com)

Expand All @@ -44,4 +50,4 @@ Performance monitoring provided by [Kadira](https://kadira.io/)
Note that Chat Locker is distributed under the [MIT License](http://opensource.org/licenses/MIT).


:smiling_imp:
:smiling_imp:
2 changes: 2 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ fi
if [ $1 ]; then
source ./build-info.sh
export METEOR_SETTINGS=$(cat settings.$1.json)
meteor add rocketchat:external
meteor add rocketchat:hubot
meteor build --server chat-locker --directory /var/www/chat-locker
cd /var/www/chat-locker/bundle/programs/server
npm install
Expand Down
13 changes: 10 additions & 3 deletions client/lib/RoomHistoryManager.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

#$('.messages-box .wrapper').data('previous-height', $('.messages-box .wrapper').get(0)?.scrollHeight - $('.messages-box .wrapper').get(0)?.scrollTop)
# ScrollListener.setLoader true
lastMessage = ChatMessageHistory.findOne({rid: rid}, {sort: {ts: 1}})
lastMessage = ChatMessage.findOne({rid: rid}, {sort: {ts: 1}})
# lastMessage ?= ChatMessage.findOne({rid: rid}, {sort: {ts: 1}})

if lastMessage?
Expand All @@ -30,7 +30,7 @@
ts = new Date

Meteor.call 'loadHistory', rid, ts, limit, 0, (err, result) ->
ChatMessageHistory.insert item for item in result
ChatMessage.insert item for item in result
room.isLoading.set false
room.loaded += result.length
if result.length < limit
Expand All @@ -41,19 +41,26 @@

return room.hasMore.get()

getMoreIfIsEmpty = (rid) ->
room = getRoom rid

if room.loaded is 0
getMore rid

isLoading = (rid) ->
room = getRoom rid

return room.isLoading.get()

clear = (rid) ->
ChatMessageHistory.remove({ rid: rid })
ChatMessage.remove({ rid: rid })
if histories[rid]?
histories[rid].hasMore.set true
histories[rid].isLoading.set false
histories[rid].loaded = 0

getMore: getMore
getMoreIfIsEmpty: getMoreIfIsEmpty
hasMore: hasMore
isLoading: isLoading
clear: clear
Loading

0 comments on commit f39bde1

Please sign in to comment.