1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-09-22 19:45:54 -04:00
Commit Graph

4401 Commits

Author SHA1 Message Date
Michael Vetter
fcd69532ad Make 'scrolled' themeable 2020-05-21 09:16:18 +02:00
Michael Vetter
469fa8f863 Display when scrolled up
Display [SCROLLED] in titlebar if a chat/muc/private win is scrolled up.

Implement https://github.com/profanity-im/profanity/issues/1289
2020-05-21 09:14:45 +02:00
Michael Vetter
d9edfa2da9 Add the word 'hilight' to trigger doc
So users are able to search the reference website easier.
2020-05-20 14:25:40 +02:00
Michael Vetter
7b541d0a6d Add /executable command
This is used to set the openers for various commands.
So far for /avatar and /urlopen.
2020-05-20 14:14:49 +02:00
Michael Vetter
21cc53bdfd Make urlopen command configurable 2020-05-20 10:54:58 +02:00
Michael Vetter
fc5fa62951 Create call_external() helper function 2020-05-20 10:54:58 +02:00
Michael Vetter
aef74f90ec Only save max 20 urls 2020-05-20 10:54:58 +02:00
Michael Vetter
ce32d874e0 Build URL ac upon printing of message in window 2020-05-20 10:54:54 +02:00
Michael Vetter
22ca81e0b6 Look for URLs via regex 2020-05-20 10:47:46 +02:00
Michael Vetter
03334664fb Actually open the URL 2020-05-20 10:47:46 +02:00
Michael Vetter
083bf34a77 Start urlopen feature
Start https://github.com/profanity-im/profanity/issues/1340
2020-05-20 10:47:40 +02:00
Michael Vetter
c99a010e57 Remove autocompletion for unanimous/regular color
See 85520ecdc5
2020-05-16 09:44:01 +02:00
Michael Vetter
9c853d9f46 xep-0092: make it possible to ask servers or components for software
This adds the new `/serversoftware` command.

```
/software user@domain.org/resource
/serversoftware domain.org
```

Fix https://github.com/profanity-im/profanity/issues/1338
2020-05-14 19:13:27 +02:00
Michael Vetter
9243655a22 Have proper autocompletion for /software in chat window
In console autocomplete from roster.
In muc autocomplete from occupants lits.
In 1:1 regular chat autocomplete from active resources of currently
selected user (new).

Also give a hint (/help resource) how to set the resource should a user choose that way.

Fix https://github.com/profanity-im/profanity/issues/1337
2020-05-14 18:09:54 +02:00
Michael Vetter
5cf6ee1bc6 Fix /correction char display
1f8b1eb740 made it possible to have utf8 chars as correction chars. So since then prefs_get_correction_char() doesn't return a regular char but a char*.
Seems like there was an oversight that we need to use %s then.
2020-05-06 13:46:40 +02:00
Michael Vetter
85520ecdc5 Remove unanimous MAM display
For some time users could choose to have the old way "unanimous" where
all the MUC history is just grey (or whatever was set). Now it is always
just displayed like regular new incoming MUC text.
2020-04-25 17:19:02 +02:00
William Wennerström
7154c357e4
Mention the related commands for /correct and /correction 2020-04-24 19:27:02 +02:00
Dmitry Podgorny
4672d0ca19 ui: fix condition
Fix mistake in a condition. Also add sanity check to
win_refresh_with_subwin().
2020-04-23 14:30:49 +03:00
Michael Vetter
4a712fcc7b Fixup for bad56b5062
sorry.. doing too many things at once..
2020-04-22 17:01:27 +02:00
Michael Vetter
bad56b5062 wins_show_subwin(): Add windows type test
Fix https://github.com/profanity-im/profanity/issues/1321
2020-04-22 14:03:29 +02:00
Michael Vetter
5ec1b03cbc _handle_carbons(): fix potential memleak 2020-04-21 17:11:04 +02:00
Michael Vetter
813fd637a1 inp_readline() Correct slashguard feature
Protect against invalid reads by checking the length.
2020-04-21 16:47:18 +02:00
Michael Vetter
f27bd92731 Make compiler happy about win_refresh_without_subwin 2020-04-20 16:44:47 +02:00
Michael Vetter
b1d71236fe win_refresh_with_subwin() fixup
Fixup for 86af6925d9
2020-04-20 16:35:13 +02:00
Michael Vetter
b9c384d6ca _iq_id_handler_free() dont set NULL
No effect here.
2020-04-20 16:17:09 +02:00
Michael Vetter
fb85cec129 Remove unused func wins_close_current() 2020-04-20 16:16:18 +02:00
Michael Vetter
8d25e18b9a Remove file_getline() declaration
Follow up for a6fa8e8e0d
2020-04-20 16:15:00 +02:00
Michael Vetter
9e73782f72 _destroy_tab() dont set tab to NULL
Setting the local pointer to NULL has no effect.

_destroy_tab() is used for g_hash_table_new_full() so we cant use a **
and set tab to NULL.
2020-04-20 16:10:24 +02:00
Michael Vetter
86af6925d9 Simplify win_refresh_with_subwin() 2020-04-20 16:09:40 +02:00
Michael Vetter
70683c07ab _mucwin_print_mention(): No need to assign pos 2020-04-20 16:02:19 +02:00
Michael Vetter
b2ec6ba4ce ui_room_join() dont get nick twice 2020-04-20 16:01:05 +02:00
Michael Vetter
785e3f5623 cons_show_aliases() simpify condition 2020-04-20 15:59:31 +02:00
Michael Vetter
5db14b2c48 Fix parsing of alias command
This actually only set the local ran pointer to NULL.
But we want an effect on the outside variable.
2020-04-20 15:54:32 +02:00
Michael Vetter
25dbebab17 log: don't log dt
Use another name.
2020-04-20 15:48:01 +02:00
Michael Vetter
5a42883c27 log: Dont shadow logp
Let's use another name.
2020-04-20 15:46:27 +02:00
Michael Vetter
a6fa8e8e0d Remove unneeded file_getline()
Not needed anymore since 0942d98c61
2020-04-20 15:42:01 +02:00
Michael Vetter
9e460973fa Fix potential memleak in stanza_create_caps_from_query_element()
Each of those should only occur one time. But let's make sure we only
write/alloc one time to be on the safe side.
2020-04-20 15:31:48 +02:00
Dmitry Podgorny
1f0159de36 Make _inp_edited() more robust 2020-04-19 00:19:16 +03:00
Michael Vetter
a39e44ac1d
Merge pull request #1318 from DebXWoody/OMEMO-MUC-Device
OMEMO Device List only for non anonymous MUCs
2020-04-18 21:44:20 +02:00
Michael Vetter
b282965ede Escape message before adding to SQL backend 2020-04-18 10:01:40 +02:00
DebXWoody
6268f5f0d7
OMEMO Device List only for non anonymous MUCs
Profanity request the OMEMO Device List for all members, also if the MUC is
anonymouse. If the user is Admin / Owner, the device list will be requtest.

Issue #1315
2020-04-17 19:53:34 +02:00
Michael Vetter
0e1bccda18 Define lock in profanity.h as extern
Fix https://github.com/profanity-im/profanity/issues/1314
2020-04-17 10:14:27 +02:00
Michael Vetter
9be7d29f1b Don't expose upload_processes
That's actually not good practise.
Realized this when checking for multiple symbol definition in issue
mentioned below.

Regards https://github.com/profanity-im/profanity/issues/1314
2020-04-17 10:05:09 +02:00
Michael Vetter
616250b2b4 Review logging in iq.c 2020-04-14 18:53:08 +02:00
Michael Vetter
48290d3d61 Review logging for blocking.c 2020-04-14 18:32:43 +02:00
Michael Vetter
b73606cc60 Review logging in presence.c
Some stuff just floods the log file. We only need this when debugging.
Others are useless without more info.
2020-04-14 18:29:15 +02:00
Dmitry Podgorny
b3eea13125 Free GError objects
glib functions can allocate a GError object that must be freed with
g_error_free(). Otherwise a memory leak happens.

There are similar unfixed places in omemo, check:
    grep "&error" src/omemo/omemo.c

Fixes #1304.
2020-04-14 03:26:49 +03:00
Michael Vetter
a42c2a1134 Only print chathistory if regular chat message
MUCPMs and regular chat messages get printed with the same code.
But we don't save MUC PMs in the sqldb, because another jid could use
the same nick the next time.

And if we would take the log out we would need a different routine,
checking for resourcepart too.

Fix https://github.com/profanity-im/profanity/issues/1312
2020-04-13 21:57:28 +02:00
Michael Vetter
18c64c0580 Free timestamp correctly
g_date_time_add_days() actually creates a new one.
2020-04-13 10:04:37 +02:00
Michael Vetter
51518497e5 Add hidden MAM setting and trigger MAM retrievel when opening new window
Only when we start the conversation.
Not yet when we get messaged and a new window is opened.
Need to have sorting of messages in the window buffer then, I guess.
Also MAM IQ should only be send one time in such a case.

If MAM is enabled history from sql backend will not be shown.

`mam` in profrc enables experimental MAM.
Can change soon again. Don't rely on stuff in this stage ;)
2020-04-12 00:42:02 +02:00