matterircd.git
4 months agoStrip long messages on UTF-8 runes boundary master
Sergey Matveev [Wed, 11 Nov 2020 11:44:05 +0000 (14:44 +0300)]
Strip long messages on UTF-8 runes boundary

4 months agoRaise timeouts
Sergey Matveev [Tue, 10 Nov 2020 19:38:53 +0000 (22:38 +0300)]
Raise timeouts

5 months agoReturn ERR_NOTREGISTERED when trying to join before registration (#434)
Peter4825 [Fri, 21 May 2021 20:23:37 +0000 (22:23 +0200)]
Return ERR_NOTREGISTERED when trying to join before registration (#434)

Co-authored-by: peter <peter>
5 months agoPreserve leading whitespace and for code blocks, new/empty lines. Fixes #420 (#432)
Haw Loeung [Mon, 17 May 2021 22:00:56 +0000 (08:00 +1000)]
Preserve leading whitespace and for code blocks, new/empty lines. Fixes #420 (#432)

* Preserve leading whitespace and new lines. Fixes #420

* Only allow empty lines for multi-line blocks of code

5 months agoFix incorrect nick for reaction removal (#433)
Haw Loeung [Sat, 8 May 2021 21:35:58 +0000 (07:35 +1000)]
Fix incorrect nick for reaction removal (#433)

5 months agoBump version
Wim [Thu, 29 Apr 2021 20:32:31 +0000 (22:32 +0200)]
Bump version

5 months agoRelease v0.24.1 (#431)
Wim [Thu, 29 Apr 2021 20:26:24 +0000 (22:26 +0200)]
Release v0.24.1 (#431)

5 months agoUpdate vendor (#430)
Wim [Wed, 28 Apr 2021 22:23:42 +0000 (00:23 +0200)]
Update vendor (#430)

* Update vendor

* Fix slack-go/slack breaking API change

5 months agoMake sure receiving item message isn't nil (slack). Fixes #428 (#429)
Wim [Wed, 28 Apr 2021 22:06:53 +0000 (00:06 +0200)]
Make sure receiving item message isn't nil (slack). Fixes #428 (#429)

6 months agoDon't show warning if lastViewedAt state file doesn't exist, also create it early...
Haw Loeung [Wed, 14 Apr 2021 22:13:55 +0000 (08:13 +1000)]
Don't show warning if lastViewedAt state file doesn't exist, also create it early (#423)

6 months agoSave last viewed at state on logout and only use stored last viewed at if newer than...
Haw Loeung [Fri, 2 Apr 2021 21:38:17 +0000 (08:38 +1100)]
Save last viewed at state on logout and only use stored last viewed at if newer than what the server knows (#422)

7 months agoFix ordering of events (such as code blocks) (#419)
Haw Loeung [Wed, 24 Mar 2021 22:21:06 +0000 (09:21 +1100)]
Fix ordering of events (such as code blocks) (#419)

Reported by Furai on IRC. This is due to having two event chan
readers.

7 months agoBump version
Wim [Wed, 24 Mar 2021 22:20:49 +0000 (23:20 +0100)]
Bump version

7 months agoRelease v0.24.0 (#410)
Wim [Sun, 21 Mar 2021 20:43:25 +0000 (21:43 +0100)]
Release v0.24.0 (#410)

7 months agoMerge pull request #409 from Aketzu/master
Wim [Sun, 21 Mar 2021 20:32:20 +0000 (21:32 +0100)]
Merge pull request #409 from Aketzu/master

Save message IDs and use them for local echo prevention

7 months agoFix channel mentions and add option to disable channel mentions as IRC NOTICEs (matte...
Haw Loeung [Fri, 19 Mar 2021 23:14:30 +0000 (10:14 +1100)]
Fix channel mentions and add option to disable channel mentions as IRC NOTICEs (mattermost) (#418)

* Allow overriding default channel wide mentions as IRC NOTICEs (#416)

* Fixed so only original message with channel wide mentions are IRC NOTICEs (#416)

7 months agoSave lastViewedAt on topic change events (#417)
Haw Loeung [Sun, 14 Mar 2021 16:27:19 +0000 (03:27 +1100)]
Save lastViewedAt on topic change events (#417)

7 months agoAdd option to hide reactions; also hide our own (#415)
Haw Loeung [Sat, 13 Mar 2021 21:08:38 +0000 (08:08 +1100)]
Add option to hide reactions; also hide our own (#415)

* Add option to hide reactions; also hide our own (#413)

* Fixed based on review

7 months agoFix buffer flushing yet again (#411)
Haw Loeung [Sat, 13 Mar 2021 20:44:27 +0000 (07:44 +1100)]
Fix buffer flushing yet again (#411)

Yet another fix to bug introduced by commit bc88bb1. Still an issue
with pasting paths causing the buffers to be flushed when it shouldn't
(e.g. /srv/mydir). Instead, split it into two regexs to avoid
confusion. One for replies to message/threads as well as reactions and
the other for message modifications.

7 months agoHandle SIGSEGV nil pointer for event.ParentUser (#412)
Haw Loeung [Tue, 9 Mar 2021 23:17:04 +0000 (10:17 +1100)]
Handle SIGSEGV nil pointer for event.ParentUser (#412)

7 months agoAdd context for reactions (#408)
Haw Loeung [Sat, 6 Mar 2021 20:24:31 +0000 (07:24 +1100)]
Add context for reactions (#408)

* Add context for reactions

Basically by showing the message emoji reactions was added to or
removed from.

* Use the correct nick of parent post/message reaction is made to

7 months agoSet correct IRC PRIVMSG nick when receiving direct messages (#407)
the-real-ed [Sat, 6 Mar 2021 20:13:40 +0000 (07:13 +1100)]
Set correct IRC PRIVMSG nick when receiving direct messages (#407)

Currently the code creates the following IRC raw message (direct
message sent from "buddy", to "me"):
:buddy!buddy@https://chat.example.com PRIVMSG buddy :hi

However, according to the IRC spec rfc1459 4.4.1
(https://tools.ietf.org/html/rfc1459), direct messages should have my
username set as the receiver.

i.e.
:buddy!buddy@https://chat.example.com PRIVMSG me :hi

Fixes: #406
Co-authored-by: Edin Sarajlic <edin@saronline.net>
7 months agoSet parse so @mentions work with nicks
Anssi Kolehmainen [Thu, 4 Mar 2021 21:44:37 +0000 (23:44 +0200)]
Set parse so @mentions work with nicks

7 months agoRemove block based callback id
Anssi Kolehmainen [Thu, 4 Mar 2021 21:43:56 +0000 (23:43 +0200)]
Remove block based callback id

7 months agoSave last sent message IDs and check for own messages
Anssi Kolehmainen [Thu, 4 Mar 2021 21:41:42 +0000 (23:41 +0200)]
Save last sent message IDs and check for own messages

7 months agoDocument how to add/remove reactions (#405)
Haw Loeung [Sun, 28 Feb 2021 22:05:20 +0000 (09:05 +1100)]
Document how to add/remove reactions (#405)

7 months agoBump version
Wim [Sat, 27 Feb 2021 12:58:39 +0000 (13:58 +0100)]
Bump version

7 months agoRelease v0.23.1 (#404)
Wim [Sat, 27 Feb 2021 12:51:10 +0000 (13:51 +0100)]
Release v0.23.1 (#404)

7 months agoFix regression, increase user pag to 1000 (slack) (#403)
Wim [Sat, 27 Feb 2021 12:46:46 +0000 (13:46 +0100)]
Fix regression, increase user pag to 1000 (slack) (#403)

7 months agoUpdate vendor - latest slack-go (#401)
Haw Loeung [Sat, 27 Feb 2021 12:41:00 +0000 (23:41 +1100)]
Update vendor - latest slack-go (#401)

7 months agoUse conversation API for DM (slack) (#402)
Wim [Sat, 27 Feb 2021 12:37:46 +0000 (13:37 +0100)]
Use conversation API for DM (slack) (#402)

8 months agoShow Mattermost message/thread IDs for file attachments (#396)
Haw Loeung [Thu, 25 Feb 2021 23:01:01 +0000 (10:01 +1100)]
Show Mattermost message/thread IDs for file attachments (#396)

* Show Mattermost message/thread IDs for file attachments

This allows replying to or adding reactions.

* Show file attachments on replay

8 months agoShow scrollback in same channel/query window (mattermost) (#393)
Haw Loeung [Sat, 20 Feb 2021 19:51:59 +0000 (06:51 +1100)]
Show scrollback in same channel/query window (mattermost) (#393)

* Show scrollback in same channel/query window. Fixes #391

* Optimise, only figure out correct nick per postlist

* Show message/thread IDs for scrollback as well

8 months agoFix buffer flushing (#398)
Haw Loeung [Sat, 20 Feb 2021 19:33:42 +0000 (06:33 +1100)]
Fix buffer flushing (#398)

Bug introduced in commit bc88bb1. Flushing of buffers would happen
when text contains '/' anywhere, and not just at the start for
actions.

8 months agoMove to go1.16 remove go1.14 (#397)
Wim [Wed, 17 Feb 2021 20:37:55 +0000 (21:37 +0100)]
Move to go1.16 remove go1.14 (#397)

8 months agoRelease v0.23.0 (#395)
Wim [Sat, 13 Feb 2021 17:18:23 +0000 (18:18 +0100)]
Release v0.23.0 (#395)

8 months agoSpace separate 'download file' (#394)
Haw Loeung [Sat, 13 Feb 2021 16:57:05 +0000 (03:57 +1100)]
Space separate 'download file' (#394)

Makes it easier to double-tap to highlight the entire URL. e.g.

|15:35 <@tuser> download file -https://mattermost.mydomain.com/api/v4/files/4a48t18bkb8rpnro88z7nys3ea

Double-tap selection includes the hyphen/dash.

8 months agoAdd scrollback support for direct messages (DMs). Fixes #385 (#388)
Haw Loeung [Fri, 12 Feb 2021 17:37:54 +0000 (04:37 +1100)]
Add scrollback support for direct messages (DMs). Fixes #385 (#388)

* Add scrollback support for direct messages (DMs). Fixes #385

* Fixed based on review

8 months agoTime out unused handshake after 10 seconds. Fixes #390 (#392)
Wim [Thu, 11 Feb 2021 22:28:21 +0000 (23:28 +0100)]
Time out unused handshake after 10 seconds. Fixes #390 (#392)

8 months agoFix permissions issues when replying to threads in DM (#389)
Haw Loeung [Thu, 11 Feb 2021 21:48:52 +0000 (08:48 +1100)]
Fix permissions issues when replying to threads in DM (#389)

This was introduced in commit c68410c5 where threadMsgUser() now calls
threadMsgChannel() which then incorrectly calls u.br.MsgChannelThread().

8 months agoFlush buffers on reactions, replies to threads or message modifications (#387)
Haw Loeung [Thu, 11 Feb 2021 21:46:49 +0000 (08:46 +1100)]
Flush buffers on reactions, replies to threads or message modifications (#387)

8 months agoAllow adding or removing reactions (#386)
Haw Loeung [Thu, 11 Feb 2021 21:44:09 +0000 (08:44 +1100)]
Allow adding or removing reactions (#386)

* Allow adding or removing reactions

* Allow adding or removing reactions for matterircd prefix/suffix context as well

8 months agoFix panic with no postlist returned. Fixes #380 (#384)
Haw Loeung [Mon, 1 Feb 2021 11:31:39 +0000 (22:31 +1100)]
Fix panic with no postlist returned. Fixes #380 (#384)

8 months agoHandle events after initialization use buffered channel (#383)
Wim [Sun, 31 Jan 2021 22:16:17 +0000 (23:16 +0100)]
Handle events after initialization use buffered channel (#383)

This change is needed for matrix bridge and also makes more sense.

8 months agoFix golangci-lint nestif and gocritic
Haw Loeung [Sun, 31 Jan 2021 07:58:55 +0000 (18:58 +1100)]
Fix golangci-lint nestif and gocritic

8 months agoFix golangci-lint unused
Haw Loeung [Sun, 31 Jan 2021 07:07:47 +0000 (18:07 +1100)]
Fix golangci-lint unused

8 months agoFix golangci-lint dupl
Haw Loeung [Sun, 31 Jan 2021 02:20:49 +0000 (13:20 +1100)]
Fix golangci-lint dupl

8 months agoAdd logging when replaying logs (#377)
Haw Loeung [Wed, 27 Jan 2021 20:53:34 +0000 (07:53 +1100)]
Add logging when replaying logs (#377)

Useful for those using IRC bouncers such as bip and znc to debug
issues with replaying. E.g. if matterircd is replaying the same
messages over and over or if it's the bouncer doing so.

8 months agoSanitize nick before sending PRIVMSG irc command (#378)
Dianne Skoll [Wed, 27 Jan 2021 20:51:58 +0000 (15:51 -0500)]
Sanitize nick before sending PRIVMSG irc command (#378)

9 months agoSkip already seen messages when replaying (#375)
Haw Loeung [Sat, 23 Jan 2021 22:32:31 +0000 (09:32 +1100)]
Skip already seen messages when replaying (#375)

GetPostsSince will return older messages with reaction changes since
LastViewedAt. This may be confusing as the user may think it's a
duplicate, or a post out of order. Plus, we don't show reaction
changes when relaying messages/logs so let's skip these.

9 months agoSanitize nicks, replace invalid chars with dash (#374)
Wim [Sat, 23 Jan 2021 22:24:04 +0000 (23:24 +0100)]
Sanitize nicks, replace invalid chars with dash (#374)

9 months agoReplay only messages not seen; also make it clear when replaying (#373)
Haw Loeung [Sat, 23 Jan 2021 20:59:54 +0000 (07:59 +1100)]
Replay only messages not seen; also make it clear when replaying (#373)

We don't want to replay messages using lastViewedAt as that includes
the last one we've seen.

Make the 'Replaying since" messages in bold so it's clear and easy to
see when.

9 months agoSave lastViewedAt and load on start up (#313) (#368)
Haw Loeung [Thu, 14 Jan 2021 22:06:43 +0000 (09:06 +1100)]
Save lastViewedAt and load on start up (#313) (#368)

* Add prefix showing messages are replies to threads when using Mattermost ThreadContext

* Save lastViewedAt and load on start up (#313)

This ensures we only replay backlog for what we haven't seen.

* Use LastViewedStateSavedTime rather than town-square when working out if saved info file is stale or too old

* Only update last viewed for channels with messages since

* Make it show human readable time

* Update last viewed for channels when adding and removing events

* Fixed based on review, make these Debug as they're already resurfaced

* Make config LastViewedSaveFile. Also make format and stale duration constant per review

* Update mm-go-irckit/userbridge.go

Co-authored-by: Wim <wim@42.be>
* Update mm-go-irckit/userbridge.go

Co-authored-by: Wim <wim@42.be>
* Fixed

* Update mm-go-irckit/userbridge.go

Co-authored-by: Wim <wim@42.be>
* Fixed logic around determining stale duration

* Refactor and reduce duplicate code

* Refactor further reducing code duplication, based on review

* Save LastViewedAt also on the messages sent

* Update LastViewedAt on reactions too

* Fixed panic, fallout from recent refactor

* Reorder grouping mutex, mutex hat

* More human friendly time

Co-authored-by: Wim <wim@42.be>
9 months agoFlush buffer on ctcp action. Fixes #367 (#371)
Wim [Wed, 13 Jan 2021 23:40:45 +0000 (00:40 +0100)]
Flush buffer on ctcp action. Fixes #367 (#371)

9 months agoAllow forcing anti-idle (#369)
Haw Loeung [Mon, 11 Jan 2021 22:09:41 +0000 (09:09 +1100)]
Allow forcing anti-idle (#369)

9 months agoAdd prefix showing messages are replies to threads when using Mattermost ThreadContex...
Haw Loeung [Mon, 11 Jan 2021 21:59:42 +0000 (08:59 +1100)]
Add prefix showing messages are replies to threads when using Mattermost ThreadContext (#366)

9 months agoBump version
Wim [Mon, 28 Dec 2020 21:59:38 +0000 (22:59 +0100)]
Bump version

9 months agoRelease v0.22.0 (#365)
Wim [Mon, 28 Dec 2020 21:52:32 +0000 (22:52 +0100)]
Release v0.22.0 (#365)

10 months agoLog useful timestamp (#364)
Haw Loeung [Sat, 26 Dec 2020 22:02:35 +0000 (09:02 +1100)]
Log useful timestamp (#364)

10 months agoAllow replying to own last message which is part of a thread (mattermost) (#363)
Haw Loeung [Sat, 26 Dec 2020 21:59:19 +0000 (08:59 +1100)]
Allow replying to own last message which is part of a thread (mattermost) (#363)

10 months agoAllow replying to your own last message to start new threads (mattermost) (#362)
Haw Loeung [Fri, 18 Dec 2020 22:36:57 +0000 (09:36 +1100)]
Allow replying to your own last message to start new threads (mattermost) (#362)

* Allow replying to your own last message to start new threads

* Update prefixcontext.md

Co-authored-by: Wim <wim@42.be>
10 months agoAdd link to matterircd-complete
Wim [Fri, 18 Dec 2020 22:35:01 +0000 (23:35 +0100)]
Add link to matterircd-complete

10 months agoSave last viewed at state and use for replaying logs (#361)
Haw Loeung [Fri, 18 Dec 2020 22:21:24 +0000 (09:21 +1100)]
Save last viewed at state and use for replaying logs (#361)

* Fixed logging in with personal access token

* Save last viewed at state and use for replaying logs

Per https://github.com/42wim/matterircd/issues/245, we can't trust
that Mattermost has updated the last viewed for channel. Instead, we
save this locally and use that for replaying of logs. Useful for when
experiencing flaky network causing matterircd to reconnect.

* Fixed using defer in range loops

* Also make the map

10 months agoAdd optional Unicode ellipsis to save on screen real estate (#358)
Haw Loeung [Fri, 18 Dec 2020 22:13:46 +0000 (09:13 +1100)]
Add optional Unicode ellipsis to save on screen real estate (#358)

* Use Unicode ellipsis to save on screen real estate

* Make Unicode optional via a config

10 months agoFix logging in with personal access token (#360)
Haw Loeung [Sun, 13 Dec 2020 00:07:15 +0000 (11:07 +1100)]
Fix logging in with personal access token (#360)

10 months agoAllow modifying or deleting last message and by Mattermost message ID (mattermost...
Haw Loeung [Sat, 12 Dec 2020 15:57:57 +0000 (02:57 +1100)]
Allow modifying or deleting last message and by Mattermost message ID (mattermost) (#353)

* Allow overriding 'last' message and by Mattermost message ID

We store the Mattermost message ID of the most recent message sent to
channel. With that, we can use 'last' to modify or delete. e.g.

| s//Update or modify my previous message
| s//

Also add support for modifying messages using the Mattermost message
ID. e.g.

| s/ncuzirothpfxbjwjhctsyfx7re/Update my previous message

* Add mutex for updating last message/thread ID

* Save last message/thread ID on posts modified as well

* Fixed to bump matterircd thread context for thread replies

With PrefixContext/SuffixContext enabled, matterircd generated threads
don't take into account replies to threads.

* Apply suggestions from code review

Co-authored-by: Wim <wim@42.be>
* Fixed from previous suggestion

Co-authored-by: Wim <wim@42.be>
10 months agoFix login regression with MFAToken feature (#357)
Wim [Sat, 12 Dec 2020 14:47:31 +0000 (15:47 +0100)]
Fix login regression with MFAToken feature (#357)

10 months agoSupport 2fa authentication (mattermost) (#355)
Toni Tauro [Sat, 12 Dec 2020 13:42:44 +0000 (14:42 +0100)]
Support 2fa authentication (mattermost) (#355)

* feat(2fa): supports 2fa authentication

Signed-off-by: Toni Tauro <eye@eyenx.ch>
* Update mm-go-irckit/service.go

Co-authored-by: Wim <wim@42.be>
10 months agoDo not show replies when hidereplies is enabled (mattermost) (#352)
Wim [Thu, 3 Dec 2020 21:39:44 +0000 (22:39 +0100)]
Do not show replies when hidereplies is enabled (mattermost) (#352)

10 months agoAllow showing replies with Prefix/SuffixContext (#351)
Haw Loeung [Mon, 30 Nov 2020 22:44:15 +0000 (09:44 +1100)]
Allow showing replies with Prefix/SuffixContext (#351)

With ShortenRepliesTo, we can now control length of replies to
display. It can be useful even with PrefixContext/SuffixContext
enabled.

10 months agoBump version
Wim [Mon, 30 Nov 2020 22:27:19 +0000 (23:27 +0100)]
Bump version

10 months agoRelease v0.21.0 (#350)
Wim [Sat, 28 Nov 2020 20:56:07 +0000 (21:56 +0100)]
Release v0.21.0 (#350)

10 months agoFix missing replay when ThreadContext set but not PrefixContext/SuffixContext (#349)
Haw Loeung [Fri, 27 Nov 2020 23:04:29 +0000 (10:04 +1100)]
Fix missing replay when ThreadContext set but not PrefixContext/SuffixContext (#349)

10 months agoAllow showing parent thread or message ID with PrefixContext / SuffixContext (#348)
Haw Loeung [Fri, 27 Nov 2020 21:29:26 +0000 (08:29 +1100)]
Allow showing parent thread or message ID with PrefixContext / SuffixContext (#348)

* Re-order so thread ID matching comes before context

Otherwise it can potentially match and think it's matterircd generated
context, if the first 3 characters are [0-9][a-f], rather than full
message or thread ID.

* Add option for showing message / thread ID in PrefixContext/SuffixContext

Rather than show the matterircd generated context, this shows the full
message / parent / thread ID.

* Also show message or parent thread ID for replayed messages

* Renamed from 'parentid' to 'mattermost' to avoid confusion

11 months agoAdd a tlskey and tlscert configuration option
Wim [Sat, 21 Nov 2020 23:51:57 +0000 (00:51 +0100)]
Add a tlskey and tlscert configuration option

11 months agoReload certs using SIGHUP. Fixes #110
Wim [Sat, 21 Nov 2020 23:42:18 +0000 (00:42 +0100)]
Reload certs using SIGHUP. Fixes #110

Thanks to robustirc via
https://github.com/robustirc/robustirc/commit/3b83e51eeed62e3e5421f03023503bd6e8c34193

11 months agoDisable watchconfig on illumos. Fixes #345 (#346)
Wim [Sat, 21 Nov 2020 23:06:14 +0000 (00:06 +0100)]
Disable watchconfig on illumos. Fixes #345 (#346)

11 months agoSupport replying to old mattermost threads (#344)
Haw Loeung [Fri, 13 Nov 2020 23:08:47 +0000 (10:08 +1100)]
Support replying to old mattermost threads (#344)

* Ignore mattermost binary

* Allow replying to threads by thread/parent ID

This allows replying to older threads if the thread/parentID is known,
e.g. from the URL ($URL/pl/{id}).

* Remove check for parentID and let user receive private error msg per review

11 months agoUse override_username when available in backlog (mattermost) (#343)
Wim [Sun, 1 Nov 2020 15:30:42 +0000 (16:30 +0100)]
Use override_username when available in backlog (mattermost) (#343)

11 months agoBump version
Wim [Fri, 30 Oct 2020 23:26:42 +0000 (00:26 +0100)]
Bump version

11 months agoRelease v0.20.2 (#340)
Wim [Fri, 30 Oct 2020 23:08:08 +0000 (00:08 +0100)]
Release v0.20.2 (#340)

11 months agoIgnore empty channels and non-channels for TOPIC (#339)
Wim [Fri, 30 Oct 2020 22:55:40 +0000 (23:55 +0100)]
Ignore empty channels and non-channels for TOPIC (#339)

12 months agoUse channel id from CreateDirectChannel (mattermost). Fixes #336 (#337)
Wim [Wed, 21 Oct 2020 19:52:44 +0000 (21:52 +0200)]
Use channel id from CreateDirectChannel (mattermost). Fixes #336 (#337)

12 months agoFix missing botname, fix attachments without text (slack) (#335)
Anssi Kolehmainen [Mon, 19 Oct 2020 20:59:06 +0000 (23:59 +0300)]
Fix missing botname, fix attachments without text (slack) (#335)

Co-authored-by: Anssi Kolehmainen <anssi@aketzu.net>
12 months agoFix nil User when using tokens (mattermost) (#334)
Wim [Sun, 18 Oct 2020 22:38:55 +0000 (00:38 +0200)]
Fix nil User when using tokens (mattermost) (#334)

12 months agoCreate a fake user when getting a bot_message (slack) (#333)
Wim [Sun, 18 Oct 2020 22:33:06 +0000 (00:33 +0200)]
Create a fake user when getting a bot_message (slack) (#333)

12 months agoIgnore private messages when not logged in (#331)
Wim [Sun, 18 Oct 2020 22:13:42 +0000 (00:13 +0200)]
Ignore private messages when not logged in (#331)

12 months agoUpdate user after error checking (#330)
Wim [Sun, 18 Oct 2020 20:44:25 +0000 (22:44 +0200)]
Update user after error checking (#330)

Would've also fixed #327, we make sure m.User can't be nil.

12 months agoMove antiIdle to matterclient package. Fixes #327 (#329)
Wim [Sun, 18 Oct 2020 17:19:59 +0000 (19:19 +0200)]
Move antiIdle to matterclient package. Fixes #327 (#329)

Clean up antiIdle goroutines when reconnecting in case of network
failures.

12 months agoAdd ShortenReplies (#322)
Paul Collins [Sun, 18 Oct 2020 11:45:40 +0000 (00:45 +1300)]
Add ShortenReplies (#322)

* add ShortenReplies

This makes busy reply threads on long messages more tolerable, in my brief experience.

The length limit is entirely arbitrary and could be made configurable.

* replace ShortenReplies bool with ShortenRepliesTo int, convert newlines to spaces

* don't count @foo against the length of the shortened message

This should ensure that useful context is always included even if many folks are tagged.

* function comment

* truncate very long words, but only if they were not skipped

12 months agoLock updateCounter against concurrent updates (#328)
Paul Collins [Sun, 18 Oct 2020 11:42:32 +0000 (00:42 +1300)]
Lock updateCounter against concurrent updates (#328)

12 months agoFix typo in example config for SuffixContext (#323)
Paul Collins [Thu, 1 Oct 2020 21:01:59 +0000 (10:01 +1300)]
Fix typo in example config for SuffixContext (#323)

13 months agoBump version
Wim [Sat, 26 Sep 2020 18:53:14 +0000 (20:53 +0200)]
Bump version

13 months agoRelease v0.20.1
Wim [Sat, 26 Sep 2020 18:38:06 +0000 (20:38 +0200)]
Release v0.20.1

13 months agoUse correct error message. Fixes #321
Wim [Sat, 26 Sep 2020 18:21:28 +0000 (20:21 +0200)]
Use correct error message. Fixes #321

13 months agoUse correct token with xoxc slack login
Wim [Wed, 23 Sep 2020 21:52:50 +0000 (23:52 +0200)]
Use correct token with xoxc slack login

13 months agoAdd support for slack xoxc tokens and cookie
Wim [Wed, 23 Sep 2020 21:33:18 +0000 (23:33 +0200)]
Add support for slack xoxc tokens and cookie

13 months agoFix panic on nick change when not logged in
Wim [Sun, 20 Sep 2020 18:49:53 +0000 (20:49 +0200)]
Fix panic on nick change when not logged in

13 months agoFix panic on sending to messages/users channels
Wim [Sun, 20 Sep 2020 18:46:31 +0000 (20:46 +0200)]
Fix panic on sending to messages/users channels

13 months agoUse always other user as channelID in DM for prefixcontext. Fixes #317
Wim [Sun, 20 Sep 2020 18:40:28 +0000 (20:40 +0200)]
Use always other user as channelID in DM for prefixcontext. Fixes #317