aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Sort nicks in mpdm name alphabeticallyTrygve Aaberge2019-06-121-2/+2
|
* Don't include own nick in mpdm namesTrygve Aaberge2019-06-121-3/+4
|
* Support topic changes for private channelsTrygve Aaberge2019-06-122-10/+11
| | | | Fixes #697
* Increase some header levels in the readmeTrygve Aaberge2019-06-121-11/+11
|
* Make distro/OS names bold in readmeTrygve Aaberge2019-06-121-11/+8
|
* Add more repo specific instructions for installing dependenciesTrygve Aaberge2019-06-121-15/+12
|
* Update FreeBSD installation instructions to python 3Trygve Aaberge2019-06-121-1/+1
| | | | | | | The weechat package on FreeBSD now uses python 3. I removed six, because we don't use it directly, it's only a dependency of websocket-client (and will be installed as that when you install the websocket-client package).
* Remove log* tags when using no_logTrygve Aaberge2019-06-111-8/+7
| | | | | When including both a log tag and a no_log tag, the message may be logged.
* new_messages should not be set for backlog messages, but for self_msgsTrygve Aaberge2019-06-111-3/+3
| | | | | | | | There are scenarios where last_read isn't set, and only self messages are printed. I experienced it when the only message in the channel was me joining and renaming the channel. In that case, last_read were never set, so we should set new_messages for our own messages so last_read will be set.
* Prevent logging of historic join/leave/topic messagesTrygve Aaberge2019-06-111-13/+10
| | | | | | Commit 79c825d changed logging so only historic messages are prevented from being logged, but join/leave/topic messages were not marked as historic, so they were always logged.
* Prevent websocket-client from importing and using numpyTrygve Aaberge2019-06-071-0/+5
| | | | | | | | | | | | | | | | This prevents a crash when you reload the script when using python 3 if numpy is installed. When weechat unloads a script it calls Py_Finalize, and when it loads a script, it calls Py_Initialize. If numpy is imported, this causes python to segfault, which crashes weechat. By setting numpy in sys.modules to None, it won't be imported when websocket-client tries to import it. numpy is an optional dependency of websocket-client, and if it's not installed, it will set numpy to None itself, so therefore, this should work just like when numpy isn't installed. See https://github.com/numpy/numpy/issues/11925 for more details about the issue in numpy.
* Get the word that is being completed the proper wayTrygve Aaberge2019-06-061-4/+4
| | | | | | Simplify emoji_completion_cb by using hook_completion_get_string to get the string that is being completed, instead of reading it out from the contents of the input.
* Add missing formatting placeholders in register_callbackTrygve Aaberge2019-06-041-2/+2
|
* Print specific error when rtm requests failsTrygve Aaberge2019-06-041-2/+2
|
* Use weechat.string_eval_path_home to eval files_download_locationTrygve Aaberge2019-06-041-1/+1
| | | | | This expands %h for us, so we don't have to do it ourselves. It also expands ~ and eval expressions.
* Resolve relative paths for upload commandTrygve Aaberge2019-06-041-1/+2
| | | | | | | The tab completion for the upload command tab completes paths relative to weechat_dir, not the directory weechat was started from. Resolve the path given to the upload command to that directory, so tab completed relative paths work.
* Remove escape characters from path if file is not foundTrygve Aaberge2019-06-041-2/+6
| | | | | | | | | | | | Some terminals (at least Terminal.app and iTerm2) escape spaces in the path when you drop a file in it. However, weechats tab completion does not escape them, so we can't just remove the escape characters, in case a user is trying to upload a file which has a name that contains "\ ". Therefore, first check if the file exists, and then remove escapes if it doesn't, and check if the unescaped name exists. Fixes #360
* Add error handling for /slack uploadTrygve Aaberge2019-06-041-1/+30
|
* Use hook_process_hashtable for uploading filesTrygve Aaberge2019-06-041-15/+16
| | | | | | | | | | | | | | Instead of creating a space separated string of the arguments for curl, create a dict and use hook_process_hashtable. The benefit of this is that we don't need to escape the spaces in the file name. This also utilizes SlackRequest to create the url we post to, so we don't have to hard code the url in this function. I tried to use hook_process_hashtable to request the url directly, instead of calling the curl command, but I didn't manage to make it upload the file in a format accepted by Slack. I opened an issue to weechat about it: https://github.com/weechat/weechat/issues/1352
* Don't use a dict as a default parameter in SlackRequestTrygve Aaberge2019-06-041-1/+3
| | | | | | The default values are created when the function is created, so when it's mutated, the default value is mutated. Create a new dict each time the function is called instead.
* Prevent crash when having mpdm with an external userTrygve Aaberge2019-06-041-1/+4
| | | | | | Fallback to the id when the user isn't known, like we do for SlackDMChannels. As a next step, we should look up the missing users and update the name, like we do for SlackDMChannels.
* Only prevent logging of messages from history requestTrygve Aaberge2019-06-031-15/+23
| | | | | | | | | | | | | | Preventing logging of all backlog messages meant that messages you sent from other clients wouldn't be logged, even if wee-slack was running. Additionally, there's an existing bug which sometimes causes the messages you send in wee-slack to be marked as backlog messages, so those wouldn't be logged either. Instead, only prevent logging of messages from the history request, since we always want to log new messages arriving over the websocket. It's still only backlog messages which are not logged, so messages which arrive when wee-slack isn't running will be logged (as long as you don't read them in another client before starting wee-slack).
* Check if channel is mpim by using is_mpim attributeTrygve Aaberge2019-06-031-1/+1
| | | | | Haven't run into issues regarding this, but using the attribute instead of the name is probably less likely to break in the future.
* Add current team and channel first in channel completionTrygve Aaberge2019-06-031-2/+15
| | | | This is the same as what the irc plugin does.
* Separate completion for irc_channels and irc_privatesTrygve Aaberge2019-06-031-1/+14
| | | | | irc_channels should only complete channels, not dms. A separate completion, irc_privates, completes dms.
* Update generated docsTrygve Aaberge2019-06-022-4/+5
|
* Allow completion of emoji with a prefixTrygve Aaberge2019-06-021-1/+6
| | | | Fixes #580
* Add completion for all command argumentsTrygve Aaberge2019-06-021-7/+61
|
* Unfurl and linkify in topic commandTrygve Aaberge2019-06-021-10/+15
|
* Add completion for channel namesTrygve Aaberge2019-06-021-0/+14
| | | | Fixes #235
* Print status in whois when either emoji or text is setTrygve Aaberge2019-06-021-4/+5
| | | | Previously, it was only printed if the status text was set.
* Support printing status with /slack status commandTrygve Aaberge2019-06-021-6/+13
| | | | | | | Now prints the status if no arguments are given. To unset the status, pass the argument -delete. Fixes #574
* Print error when profile/status couldn't be setTrygve Aaberge2019-06-021-0/+6
|
* Print error when a command is not used on an appropriate bufferTrygve Aaberge2019-06-021-0/+2
|
* Use proper nicks for mpdm namesTrygve Aaberge2019-06-021-17/+11
|
* Set own nick to display name if setTrygve Aaberge2019-06-021-8/+14
| | | | | | Previously, own nick would always be set to the username. Fixes #692
* Set tag thread_message on thread messages printed in channelsTrygve Aaberge2019-06-021-4/+10
|
* Render "by invitation from" before reactionsTrygve Aaberge2019-06-022-39/+31
|
* Don't set nick_unknown tag if user isn't setTrygve Aaberge2019-06-021-1/+1
| | | | | | The only messages left that gets nick_unknown is messages in the team buffer and the "getting channel history" message. There's no point in setting nick_unknown for these.
* Set nick tag for join, leave and topic messagesTrygve Aaberge2019-06-021-3/+3
|
* Don't set channel specific tags by defaultTrygve Aaberge2019-06-021-7/+7
| | | | | We shouldn't set irc_privmsg and the others for all messages, just for normal messages in channels.
* Don't log backlog messages to the logfileTrygve Aaberge2019-06-021-1/+1
| | | | Fixes #663
* Store join/leave/topic messagesTrygve Aaberge2019-06-021-10/+12
|
* Separate the tags for join and leaveTrygve Aaberge2019-06-021-8/+4
| | | | | Replace irc_smart_filter with irc_join and irc_part. There is no smartness implemented, so irc_smart_tag shouldn't be set.
* Remove force_backlog from buffer_prntTrygve Aaberge2019-06-021-3/+3
| | | | | The "getting channel history" message doesn't need any of the logic in buffer_prnt, so by printing it directly, we can drop this argument.
* Support backlog tags for all tagsetsTrygve Aaberge2019-06-021-12/+12
| | | | | By sending in backlog as a separate argument to tag instead of as a tagset, we can mark all types of messages as backlog messages.
* Simplify process_subteam_updatedTrygve Aaberge2019-06-021-11/+6
|
* Move subteam created/updated functionsTrygve Aaberge2019-06-021-21/+24
|
* Remove redundant arguments and improve some variable namesTrygve Aaberge2019-06-021-81/+64
| | | | | | Mostly removes None as a second argument to .get(...), since that is the default value. Also replaces get with brackets a few places where get is not necessary.
* Set the self_msg tag on own messagesTrygve Aaberge2019-06-021-19/+18
|