1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-11-03 19:37:16 -05:00
Commit Graph

6279 Commits

Author SHA1 Message Date
Michael Vetter
17b1b431f5 Replace stanza_get_child_by_name_and_ns with xmpp_stanza_get_child_by_name_and_ns
Replace our own stanza_get_child_by_name_and_ns() with the upstreamed
xmpp_stanza_get_child_by_name_and_ns() provided by the new
libstrophe/libmesode 0.10.0.
2020-09-30 19:41:08 +02:00
Michael Vetter
0a9200e268 Require libstrophe/libmesode 0.10.0 2020-09-30 19:30:40 +02:00
Michael Vetter
3d082bfb66
Merge pull request #1424 from niacat/netbsd
NetBSD support
2020-09-07 10:31:33 +02:00
nia
ce67753423 Avoid passing NULL pointers to curses functions.
This allows profanity to work without segfaulting from NULL
pointer dereferences when used with NetBSD libcurses.

Basic functionality was tested, there may be more NULL pointer
issues hiding.
2020-09-04 12:59:20 +02:00
nia
52e9be4abc Basic support for building on NetBSD.
- Add NetBSD as a recognized platform without -ldl.
- Allow building with NetBSD libcurses instead of ncurses.
- Portability to NetBSD sh - use POSIX '=' instead of '=='.
2020-09-04 12:55:20 +02:00
Michael Vetter
4f1caeca1e
Merge pull request #1421 from misaflo/theme-gruvbox
Update gruvbox theme (background color)
2020-08-27 11:12:26 +02:00
Florent Lévigne
f90f9e0c0f Update gruvbox theme (background color) 2020-08-27 10:49:30 +02:00
Michael Vetter
98b9cf061c
Merge pull request #1415 from profanity-im/gtk23
configure: support gtk3 too
2020-08-10 14:44:47 +02:00
Michael Vetter
02cf186476
Merge pull request #1416 from profanity-im/memleaks2
Fix memory leak in _handle_chat()
2020-08-10 14:43:57 +02:00
Dmitry Podgorny
7553676b40 Fix memory leak in _handle_chat()
jid_create() for attribute "to" was called twice and the 1st object was
lost.
2020-08-07 00:47:45 +03:00
Michael Vetter
05d19cb6e3 configure: support gtk3 too
Make Profanity compilable with gtk2 and gtk3.
Prefer the latter.
2020-08-04 18:05:04 +02:00
Michael Vetter
3e7776a9fa
Merge pull request #1413 from profanity-im/feature/mam-addtodb-nodup
MAM: Only add each message once to database
2020-07-24 10:53:03 +02:00
Michael Vetter
c9b154b1a2 database: Only insert if there is no entry with same archive_id
archive_is is <stanza-id> or <result id=""> and should identify one
message stable and uniquely.

See XEP-0359: Unique and Stable Stanza IDs.

We need this for example for this situation:
* we go online with Profanity
* we fetch all messages since yesterday
* we add them to the db
* we go offline
* we go online with Profanity
* we fetch all messages since yesterday
* we only want to add the new ones

So far we don't ask MAM "give me all since last 'id'" but since a
certain date.

In case no archive_id will be set, it will be `(null)` and thus should
be inserted anyways because it won't find a value with (null) in that
row.

Because when adding we use `message->stanzaid ? message->stanzaid : "",`
so it will be empty in such a case.

Regards MAM: https://github.com/profanity-im/profanity/issues/660
Regards Stable IDs: https://github.com/profanity-im/profanity/issues/1207
2020-07-23 15:23:18 +02:00
Michael Vetter
8852db03d6 Parse stanza-id
Add stable stanza IDs to ProfMessage struct.

We parse this for 1:1 messages (MUC needs to be done too).

<stanza-id> for live messages
<result id="x"> for MAM messages

Regards MAM: https://github.com/profanity-im/profanity/issues/660
Regards Stable IDs: https://github.com/profanity-im/profanity/issues/1207
2020-07-23 14:21:27 +02:00
Michael Vetter
5db840e0cc Fix memleak in win_print_outgoing_with_receipt()
We should actually process the receipts also in LMC I think.

Regards https://github.com/profanity-im/profanity/issues/805
2020-07-23 10:06:49 +02:00
Michael Vetter
ade0ff589d parser.c: Use glib
We use malloc() to allcoate memory for the arguments.
But later on in cmd_funcs.c we use g_strfreev() to free it.
Let's use g_malloc() to allocate instead.

Second change is to use g_malloc() and g_free() for a gchar.
2020-07-23 09:42:43 +02:00
Michael Vetter
8c0c5cb28c Fix /correct quotation marks usage
Add new `parse_args_as_one()` function to just use everything after the
command as the argument.

Fix https://github.com/profanity-im/profanity/issues/1404
2020-07-23 09:40:22 +02:00
Michael Vetter
a5ca65453e Fix lastactivity behaviour
Autocomplete only completed on|off.

Now:

`/lastactivity get` -> get server uptime
`/lastactivity get <jid>` -> get user lastactivity
`/lastactivity set on` -> enable for self
`/lastactivity set off` -> disable for self

Fix https://github.com/profanity-im/profanity/issues/1411
2020-07-22 13:13:30 +02:00
Michael Vetter
7319f9eb1d Expand /lastactivity help 2020-07-22 12:49:08 +02:00
Michael Vetter
ca36150d45
Merge pull request #1410 from licaon-kter/patch-1
Fix missed text in #1224
2020-07-22 11:41:05 +02:00
Licaon_Kter
ed4253d413
Fix missed text in #1224 2020-07-22 09:26:36 +00:00
Michael Vetter
5a9f76c16a parser.c: Use helper function to reduce duplicate code
`parse_args()` and `parse_args_with_freetext()` shared a lot of common
code.
Let's have a helper function `_parse_args_helper()` for that. The
`with_freetext` parameter will make it behave like
`parse_args_with_freetext()`.

In preparation for https://github.com/profanity-im/profanity/issues/1404
2020-07-21 10:45:29 +02:00
Michael Vetter
0077d02c86 parse_args(): Call g_free() once 2020-07-21 10:20:34 +02:00
Michael Vetter
86281072f9 Use parse_args_with_freetext() for /correct
This commit partly reverts
8f37afcd37
Which was using a wrong approach to achieve this.

It changed parse_args() to have a -1 for infinite parameters.
But actually parse_args_with_freetext() should have been used exactly
for this behaviour.

Discovered when checking for
https://github.com/profanity-im/profanity/issues/1404
2020-07-20 15:33:19 +02:00
Michael Vetter
c5c969a929
Merge pull request #1407 from wstrm/fix-arch-zst
Change to .tar.zst archives that latest Arch devtools uses
2020-07-20 11:31:13 +02:00
William Wennerström
9ecd37a4d9
Change to .tar.zst archives that latest Arch devtools uses
This is required because of:
https://www.archlinux.org/news/now-using-zstandard-instead-of-xz-for-package-compression/
2020-07-20 10:52:12 +02:00
Michael Vetter
b5794a51bb bookmark_ignore.c: use gchar instead of char 2020-07-20 10:17:35 +02:00
Michael Vetter
e3797076d9 Add filetype check to pre hook example
We have `Language: Cpp` in .clang-format but recently it tried to format
my makefile anyways.
Let's add this to be sure.
2020-07-15 11:36:39 +02:00
Michael Vetter
1f90a41b89 Fix typo in comment 2020-07-15 11:18:27 +02:00
Michael Vetter
d674250977 Add comment to easily find where to put the next command 2020-07-15 11:04:55 +02:00
Michael Vetter
0d8b62c9a2 Format cmd_defs
Format it more readable and disable clang for this part.
Was messed up in 9b55f2dec0.
2020-07-15 11:04:18 +02:00
Michael Vetter
39315483a8 Remove /tiny command
boothj5 gave his okay too.

Fix https://github.com/profanity-im/profanity/issues/1370
2020-07-10 17:48:34 +02:00
Michael Vetter
b6361ddeab
Merge pull request #1403 from wstrm/fix-error-no-free
Free errors after they have been printed
2020-07-10 15:24:05 +02:00
Michael Vetter
921d191038
Merge pull request #1402 from wstrm/add-ubuntu-ci
Ubuntu Latest (20.04 currently) in CI
2020-07-10 15:22:49 +02:00
Michael Vetter
29130e9293 Add forgotten file..
Belongs to 95ab7ee062
2020-07-10 15:19:48 +02:00
Michael Vetter
95ab7ee062 Setting: only write in console upon muc mention
`/console muc mention` additionally to `first|none|all`.

Fix https://github.com/profanity-im/profanity/issues/1371
2020-07-10 15:16:34 +02:00
William Wennerström
3b37893aa3
Free errors after they have been printed 2020-07-10 14:50:29 +02:00
William Wennerström
1de9cffd1a
Ubuntu Latest (20.04 currently) in CI 2020-07-10 14:14:04 +02:00
Michael Vetter
10d771f3d1 Merge branch 'master' of github.com:profanity-im/profanity 2020-07-10 13:46:06 +02:00
Michael Vetter
63a71af803 Merge branch 'feature/ox-discover'
Patch sent by DebXWoody by mail under:
`[PATCH] OX: Discovering Public Keys via PEP`
2020-07-10 13:43:32 +02:00
Michael Vetter
d7b7f54782 ox review: Use english not german 2020-07-10 13:41:48 +02:00
DebXWoody
0552e50c78 OX: XEP-0373: OpenPGP for XMPP - Version 0.5.0 (2020-06-19)
Discovering Public Keys via PEP

* 4.3 Discovering Public Keys of a User
* 4.4 Requesting Public Keys

* Import Public Keys into GnuPG's local keyring.

Issue: #1331
2020-07-10 13:40:00 +02:00
Michael Vetter
d075c62fed
Merge pull request #1400 from profanity-im/feature/1399-console-hilight
Dont hilight console once all messages have been read
2020-07-09 17:07:25 +02:00
Michael Vetter
ec6b61c2bb Mention profnaity_version in release guide 2020-07-09 17:03:05 +02:00
Michael Vetter
14a881697d Adapt unittests 2020-07-09 16:13:28 +02:00
Michael Vetter
7b49fbdf45 Pass window to functions so we dont have to call twice 2020-07-09 16:11:50 +02:00
Michael Vetter
11d849aa7f Dont hilight console once all messages have been read
If we receive a message we get:
<< room message: eagle@conference.anoxinon.me (win 2)

Same for private chats and regular chats.
And several other kinds of notifications.

If we only receive notifications from a chat window it would be nice to
also clear the hilight on the console window since we already catched up
by reading the actual message in the chat window.

Probably not the best description :-) I hope you get it..

Regards https://github.com/profanity-im/profanity/issues/1399
2020-07-09 15:44:35 +02:00
Michael Vetter
8a2026ccbe Make _show_roster_contacts static 2020-07-09 08:48:10 +02:00
Michael Vetter
9db466dcbd ci os tw: disable building of stabber
libmicrohttpd 0.97.1 changed some types.

These commits adapt stabber:
f33c4b6ba9
81f38c6a33

Tumbleweed does not yet have the latest libmicrohttpd in its
repositories. But it is updated in the devel repo.
So should land there in the next couple of days.

Let's disable building stabber on TW for that time.
2020-07-08 13:03:19 +02:00
Michael Vetter
fc93546b53 readme: add link to contributing.md 2020-07-07 14:21:01 +02:00