Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support alternative user prefixes for user IDs #259

Merged
merged 1 commit into from
Aug 1, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/models/helpers.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
var hasKey = require('lodash').has;

// Channel, file, group, DM, user, usergroup
var RECOGNIZED_API_TYPE_PREFIXES = ['C', 'F', 'G', 'D', 'U', 'S'];
var RECOGNIZED_API_TYPE_PREFIXES = ['C', 'F', 'G', 'D', 'U', 'W', 'S'];


/**
Expand Down Expand Up @@ -31,7 +31,7 @@ var getModelClass = function getModelClass(obj) {
modelClass = require('./file');
} else if (apiTypePrefix === 'D') {
modelClass = require('./dm');
} else if (apiTypePrefix === 'U') {
} else if (apiTypePrefix === 'U' || apiTypePrefix === 'W') {
modelClass = require('./user');
} else if (apiTypePrefix === 'S') {
modelClass = require('./user-group');
Expand Down