Skip to content

Commit 1ddf452

Browse files
committed
Migration ZF3
1 parent a14aca2 commit 1ddf452

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

config/module.config.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
),
4545
'controllers' => array(
4646
'factories' => array(
47-
'MattermostMessenger\Controller\MattermostChat' => 'MattermostMessenger\Controller\Factory\MattermostChatControllerFactory',
47+
'MattermostMessenger\Controller\Mattermostchat' => 'MattermostMessenger\Controller\Factory\MattermostChatControllerFactory',
4848
)
4949
),
5050
'view_helpers' => array(

public/assets/js/mattermostchat.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@
241241
this.element.on('click', '.ack', function(event){
242242
var postid = $(this).data('id');
243243
var me = $(this);
244-
$.getJSON(self.options.baseUrl + '/mattermost/MattermostChat/ack?postid='+postid, function(data){
244+
$.getJSON(self.options.baseUrl + '/mattermost/mattermostchat/ack?postid='+postid, function(data){
245245
if(self.connFailCount !== 0) {
246246
//if no websocket, we rely on status code to know if reaction correctly added
247247
if(data.result == 200) {
@@ -253,7 +253,7 @@
253253

254254
this.element.on('click', "#previousMessages", function(e){
255255
var postid = self.element.find("#conversation .message-body").first().data('id');
256-
$.getJSON(self.options.baseUrl + '/mattermost/MattermostChat/getLastPosts?channelid='+self.currentChannelId+'&beforeid='+postid, function(data){
256+
$.getJSON(self.options.baseUrl + '/mattermost/mattermostchat/getLastPosts?channelid='+self.currentChannelId+'&beforeid='+postid, function(data){
257257
self._addPosts(data, true, false);
258258
});
259259
});
@@ -274,7 +274,7 @@
274274
$.getJSON(self.options.baseUrl + '/mattermost/mattermostchat/getDefaultChannelId?teamid=' + self.options.teamName, function (data) {
275275
self.currentChannelId = data.channelid;
276276
}),
277-
$.getJSON(self.options.baseUrl + '/mattermost/MattermostChat/getMyID', function(data){
277+
$.getJSON(self.options.baseUrl + '/mattermost/mattermostchat/getMyID', function(data){
278278
self.myId = data.id;
279279
})
280280
).then(function(data, textStatus, jqHXR){
@@ -288,7 +288,7 @@
288288
});
289289
//get my groups once and for all
290290
self.element.find('.compose-sideBar ul').empty();
291-
$.getJSON(self.options.baseUrl + '/mattermost/mattermostChat/getMyChannels?teamid=' + self.options.teamName, function (data) {
291+
$.getJSON(self.options.baseUrl + '/mattermost/mattermostchat/getMyChannels?teamid=' + self.options.teamName, function (data) {
292292
self._addGroups(data);
293293
});
294294
}).fail(function(data, textStatus, jqHXR){
@@ -342,7 +342,7 @@
342342
}
343343
});
344344

345-
$.when($.getJSON(self.options.baseUrl + '/mattermost/MattermostChat/getMyToken', function(data){
345+
$.when($.getJSON(self.options.baseUrl + '/mattermost/mattermostchat/getMyToken', function(data){
346346
self.options.token = data.token;
347347
})).then(function(){
348348
self._websocketConnect();
@@ -375,7 +375,7 @@
375375
this.element.find('.groupid[data-id="' + channelId + '"] .sideBar-time').append('<i class="fa fa-check fa-2x"></i>');
376376
}
377377
self.currentChannelId = channelId;
378-
$.getJSON(self.options.baseUrl + '/mattermost/MattermostChat/getLastPosts?channelid='+self.currentChannelId, function(data, textStatus, jqHXR){
378+
$.getJSON(self.options.baseUrl + '/mattermost/mattermostchat/getLastPosts?channelid='+self.currentChannelId, function(data, textStatus, jqHXR){
379379
self._addPosts(data, false, alert);
380380
if(self.connFailCount !== 0) { //no websocket : start polling
381381
//periodic refresh
@@ -387,7 +387,7 @@
387387
});
388388
//fetch members
389389
$.when(
390-
$.getJSON(self.options.baseUrl + '/mattermost/MattermostChat/getChannelMembers?channelid='+self.currentChannelId, function(data){
390+
$.getJSON(self.options.baseUrl + '/mattermost/mattermostchat/getChannelMembers?channelid='+self.currentChannelId, function(data){
391391
self._addUsers(data);
392392
})
393393
).then(
@@ -427,7 +427,7 @@
427427
'comment': message,
428428
'postId': postId
429429
};
430-
$.post(this.options.baseUrl+'/mattermost/MattermostChat/patchMessage', post, function (data) {
430+
$.post(this.options.baseUrl+'/mattermost/mattermostchat/patchMessage', post, function (data) {
431431
if(successCallback !== undefined) {
432432
successCallback(data);
433433
}
@@ -594,7 +594,7 @@
594594
//this key exists only if posts came from websocket
595595
//we need to request the server via api
596596
var self = this;
597-
$.getJSON(this.options.baseUrl + '/mattermost/MattermostChat/getImages?filesId='+data.file_ids, function(data){
597+
$.getJSON(this.options.baseUrl + '/mattermost/mattermostchat/getImages?filesId='+data.file_ids, function(data){
598598
self._addImagesToPost(data, post);
599599
});
600600
}
@@ -647,7 +647,7 @@
647647
'</div>' +
648648
'</div>');
649649
if(this.options.acknowledgement == true) {
650-
$.getJSON(this.options.baseUrl + '/mattermost/MattermostChat/isack?postid=' + postid, function (data) {
650+
$.getJSON(this.options.baseUrl + '/mattermost/mattermostchat/isack?postid=' + postid, function (data) {
651651
if (data.ack == true) {
652652
post.find('.message-main-sender').append('<div class="ack ack-sent"><span class="fa fa-check-square-o"></span></div>');
653653
} else {
@@ -659,7 +659,7 @@
659659
//this key exists only if posts came from websocket
660660
//we need to request the server via api
661661
var self = this;
662-
$.getJSON(this.options.baseUrl + '/mattermost/MattermostChat/getImages?filesId='+data.file_ids, function(data){
662+
$.getJSON(this.options.baseUrl + '/mattermost/mattermostchat/getImages?filesId='+data.file_ids, function(data){
663663
self._addImagesToPost(data, post);
664664
});
665665
}
@@ -767,7 +767,7 @@
767767
var self = this;
768768
$('.user').each(function(index){
769769
var me = $(this);
770-
$.getJSON(self.options.baseUrl + '/mattermost/MattermostChat/getUserStatus?userid='+$(this).data('id'), function(data){
770+
$.getJSON(self.options.baseUrl + '/mattermost/mattermostchat/getUserStatus?userid='+$(this).data('id'), function(data){
771771
self._changeStatus(me.find('.user-status'), data.status);
772772
});
773773
});

0 commit comments

Comments
 (0)