Skip to content
New issue

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

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

Already on GitHub? # to your account

Bug slack channel archive #69

Open
wants to merge 75 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
913770c
added LUSERS function
jcolson Feb 6, 2019
7889d2e
indexOf was not tested properly ... test for > -1
jcolson Feb 6, 2019
48d2ac8
added patch #55
jcolson Feb 6, 2019
ad73bfe
Merge branch 'patch55'
jcolson Feb 6, 2019
a1d9186
added functionality for /WHO
jcolson Feb 6, 2019
1602e02
changed quotes to doubles, changed hostname to be consistant irslackd
jcolson Feb 6, 2019
e47fb86
added ability to /invite user
jcolson Feb 6, 2019
efd99bb
replaced all double qutoes for singles
jcolson Feb 6, 2019
2613ee1
catch exceptions on invite and give error feedback to user
jcolson Feb 7, 2019
58591c3
formatting changes, lint made me do it
jcolson Feb 8, 2019
cfdd495
fixed merge conflict and eslint'd
jcolson Feb 8, 2019
9dcc516
switched from channel.invite to conversations.invite
jcolson Feb 8, 2019
094d302
updated test_invite
jcolson Feb 8, 2019
664d07b
changed plan number
jcolson Feb 9, 2019
a5d13d5
data element during testing was null, causing an unexpected exception…
jcolson Feb 9, 2019
2900f15
used ircToSlack map instead of lookupUserId
jcolson Feb 9, 2019
9da1d69
throw an exception instead of sending error to ircclient right away
jcolson Feb 9, 2019
37c76e2
use ircToSlack map instead of lookupChannelId
jcolson Feb 9, 2019
d0e35e2
invite test almost working
jcolson Feb 9, 2019
c8949ca
invite_test working now
jcolson Feb 9, 2019
43f4e4e
removed console debug for invite function
jcolson Feb 9, 2019
c041f23
throw exception if id's aren't found in map
jcolson Feb 9, 2019
4ae0d80
added not in cache exception test for invite
jcolson Feb 9, 2019
cfd3b0a
added test for /who
jcolson Feb 9, 2019
88a64d5
changed implementation of /who to use locally cached slack info
jcolson Feb 10, 2019
3ae753a
commented out debug
jcolson Feb 10, 2019
b033c35
added functionality for /topic and also command line option to mark c…
jcolson Feb 11, 2019
b1f281f
replaced the slack ids with the irc comperables for the ircd.write of…
jcolson Feb 11, 2019
acaf507
fixed the /who #channel
jcolson Feb 11, 2019
784d4c9
Merge branch 'feature-who' into develop
jcolson Feb 11, 2019
a8bbdb6
fixed who ircd.write format
jcolson Feb 12, 2019
6bee539
Merge branch 'feature-who' into develop
jcolson Feb 12, 2019
fd8042a
don't fetch users.info for users that are already cached in slackUser…
jcolson Feb 12, 2019
fb0ff54
Merge branch 'feature-who' into develop
jcolson Feb 12, 2019
9d614ac
throw errors if user info isn't found in \who
jcolson Feb 12, 2019
8e0af08
Merge branch 'feature-who' into develop
jcolson Feb 12, 2019
1c7fa4b
test text (testMsg) stated that the Expected IRCd line was the Actual…
jcolson Feb 14, 2019
da1f7d6
added /kick functionality
jcolson Feb 23, 2019
5e991a1
add try/catch block to /who forEach
jcolson Feb 24, 2019
b0094bf
added irc id's to error output
jcolson Feb 24, 2019
8ea33f2
Merge branch 'feature-who' into develop
jcolson Feb 24, 2019
20b7dc7
cache may not have been populated yet, so mapSlackUser first
jcolson Feb 24, 2019
ecedc76
Merge branch 'feature-who' into develop
jcolson Feb 24, 2019
0b6bd7d
# enter brief description of what was done
jcolson Feb 24, 2019
da7458d
Merge branch 'feature-who' into develop
jcolson Feb 24, 2019
0e7e903
write END of who AFTER all async who responses for channel
jcolson Feb 24, 2019
ecc0e98
write END of who AFTER all async who responses for channel
jcolson Feb 24, 2019
78d8243
fixed async issue with end who
jcolson Feb 24, 2019
2ef33fd
Merge branch 'feature-who' into develop
jcolson Feb 24, 2019
01a2370
(really) fixed END for WHO this time. also fixed who to show Here an…
jcolson Feb 25, 2019
a9af063
Merge branch 'feature-who' into develop
jcolson Feb 25, 2019
ac35301
added additional whois output
jcolson Feb 25, 2019
99cbe3a
fixed message number for whoisserver (312)
jcolson Feb 25, 2019
797e75f
don't run onslackready if already running
jcolson Feb 25, 2019
59d35b9
moving timestamp for channels.mark one minute ahead works on smaller …
jcolson Feb 25, 2019
f18ee0a
changed test to look for irc values, not slack values
jcolson Feb 25, 2019
5de4415
changed from slack user name to ircNickId
jcolson Feb 25, 2019
c99cc47
merge 5de4415589bc5fa6ddb8b7655cd4f02e4eb4c686
jcolson Feb 25, 2019
480e41d
from adsr: Checking for leading `'@'` on usernames might be a cool fe…
jcolson Feb 25, 2019
8b77174
missded the second ircNickId in onIrcWho
jcolson Feb 25, 2019
d6d33c0
merged from who
jcolson Feb 25, 2019
56cc3e4
adsr: Can we call `users.info` synchronously in `/who` instead
jcolson Feb 25, 2019
3bb9902
getting tests working again after changes
jcolson Feb 25, 2019
3e4b328
merge and getting tests to work
jcolson Feb 25, 2019
d0325d4
test works on later branch, merging the code into kick branch
jcolson Feb 26, 2019
5911ca1
kick test working
jcolson Feb 26, 2019
e71221b
test_who is working now. changed the async arrow function foreach im…
jcolson Feb 26, 2019
58e372c
added test_topic for /topic
jcolson Feb 27, 2019
4b57c56
working on channel_archive and channel_deleted
jcolson Feb 27, 2019
08744b5
WIP rename issue #68
jcolson Feb 28, 2019
ae9394e
added subtype group_name and groups.mark call
jcolson Feb 28, 2019
d64aa1d
fixed being able to /part private channels ... especially when you're…
jcolson Mar 2, 2019
062101f
make sure exception data is json and not undefined for the leaving of…
jcolson Mar 2, 2019
f057b64
removed debug logs
jcolson Mar 3, 2019
75e2f8a
handle group_archive as well as fixed a bug in onslackchanneljoin for…
jcolson Mar 3, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions bin/irslackd.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const DEFAULT_PORT = 6697;
const DEFAULT_TLS_PKEY = os.homedir() + '/.irslackd/pkey.pem';
const DEFAULT_TLS_CERT = os.homedir() + '/.irslackd/cert.pem';
const DEFAULT_RTM_CLIENT_LOG_LEVEL = 'info';
const DEFAULT_MARK = false;

const opt = require('node-getopt').create([
[ 'h', 'help', 'Show this help' ],
Expand All @@ -18,10 +19,12 @@ const opt = require('node-getopt').create([
[ 'k', 'privkey=PATH', 'Set TLS private key path (default: ' + DEFAULT_TLS_PKEY + ')' ],
[ 'c', 'cert=PATH', 'Set TLS cert path (default: ' + DEFAULT_TLS_CERT + ')' ],
[ 'L', 'rtmLogLvl=LEVEL', 'Set RTM Client log level (default: ' + DEFAULT_RTM_CLIENT_LOG_LEVEL + ')' ],
[ 'm', 'mark=BOOLEAN', 'Keep channels marked read in slack (default: ' + DEFAULT_MARK + ')' ],
[ 'i', 'insecure', 'Do not use TLS encryption (not recommended)' ],
]).bindHelp().parseSystem();

new irslackd.Irslackd({
mark: opt.options.mark || DEFAULT_MARK,
host: opt.options.host || DEFAULT_HOST,
port: opt.options.port || DEFAULT_PORT,
tlsOpts: opt.options.insecure ? false : {
Expand Down
42 changes: 42 additions & 0 deletions irslackd-bug.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
Feb 27 16:43:48 vpc irslackd[1039]: slack_in user_typing { type: 'user_typing', channel: 'D43KMNF16', user: 'U0AAQ3HQ9' }
Feb 27 16:43:48 vpc irslackd[1039]: slack_out conversations.leave { channel: 'CGJ9UEYUA' }
Feb 27 16:43:48 vpc irslackd[1039]: irc_in PART #sev_sfr Buh-bye!
Feb 27 16:43:48 vpc irslackd[1039]: Trace: irslackd_err Failed onIrcPart: Error: {
Feb 27 16:43:48 vpc irslackd[1039]: "method": "conversations.leave",
Feb 27 16:43:48 vpc irslackd[1039]: "options": {
Feb 27 16:43:48 vpc irslackd[1039]: "channel": "CGJ9UEYUA"
Feb 27 16:43:48 vpc irslackd[1039]: },
Feb 27 16:43:48 vpc irslackd[1039]: "error": {
Feb 27 16:43:48 vpc irslackd[1039]: "code": "slackclient_platform_error",
Feb 27 16:43:48 vpc irslackd[1039]: "data": {
Feb 27 16:43:48 vpc irslackd[1039]: "ok": false,
Feb 27 16:43:48 vpc irslackd[1039]: "error": "channel_not_found",
Feb 27 16:43:48 vpc irslackd[1039]: "scopes": [
Feb 27 16:43:48 vpc irslackd[1039]: "read",
Feb 27 16:43:48 vpc irslackd[1039]: "client",
Feb 27 16:43:48 vpc irslackd[1039]: "admin",
Feb 27 16:43:48 vpc irslackd[1039]: "identify",
Feb 27 16:43:48 vpc irslackd[1039]: "post",
Feb 27 16:43:48 vpc irslackd[1039]: "apps"
Feb 27 16:43:48 vpc irslackd[1039]: ],
Feb 27 16:43:48 vpc irslackd[1039]: "acceptedScopes": [
Feb 27 16:43:48 vpc irslackd[1039]: "channels:write",
Feb 27 16:43:48 vpc irslackd[1039]: "groups:write",
Feb 27 16:43:48 vpc irslackd[1039]: "mpim:write",
Feb 27 16:43:48 vpc irslackd[1039]: "im:write",
Feb 27 16:43:48 vpc irslackd[1039]: "post"
Feb 27 16:43:48 vpc irslackd[1039]: ]
Feb 27 16:43:48 vpc irslackd[1039]: }
Feb 27 16:43:48 vpc irslackd[1039]: }
Feb 27 16:43:48 vpc irslackd[1039]: }
Feb 27 16:43:48 vpc irslackd[1039]: at WebClient.apiCallOrThrow (/home/ec2-user/src/irslackd/lib/irslackd.js:1268:13)
Feb 27 16:43:48 vpc irslackd[1039]: at <anonymous>
Feb 27 16:43:48 vpc irslackd[1039]: at process._tickCallback (internal/process/next_tick.js:189:7)
Feb 27 16:43:48 vpc irslackd[1039]: at Irslackd.logError (/home/ec2-user/src/irslackd/lib/irslackd.js:1059:13)
Feb 27 16:43:48 vpc irslackd[1039]: at res.catch (/home/ec2-user/src/irslackd/lib/irslackd.js:1231:18)
Feb 27 16:43:48 vpc irslackd[1039]: at <anonymous>
Feb 27 16:43:48 vpc irslackd[1039]: at process._tickCallback (internal/process/next_tick.js:189:7)
Feb 27 16:43:49 vpc irslackd[1039]: slack_in pong { type: 'pong', reply_to: 1564 }
Feb 27 16:43:49 vpc irslackd[1039]: slack_in pong { type: 'pong', reply_to: 25602 }
Feb 27 16:43:50 vpc irslackd[1039]: irc_in WHO #randomtest

Loading