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

6305 Commits

Author SHA1 Message Date
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
Michael Vetter
95b75a2948
Merge pull request #1319 from profanity-im/input
Make _inp_edited() more robust
2020-04-19 00:07:31 +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
a1d37dda18 Add Fedora travis CI
Regards https://github.com/profanity-im/profanity/issues/1314#issuecomment-614242435
2020-04-17 15:46:55 +02:00
Michael Vetter
05db5226dd Fix http_upload stub 2020-04-17 10:44:39 +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
00fc0e2e8d Set new mailinglist 2020-04-15 10:49:24 +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
Michael Vetter
00cf4e6f41
Merge pull request #1313 from profanity-im/memleaks
Free GError objects
2020-04-14 09:40:51 +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
a800bfcbf8
Merge pull request #1306 from profanity-im/feature/mam
Add basic MAM support
2020-04-13 10:50:18 +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
Michael Vetter
98200ebd43 Check if server suppors MAM 2020-04-12 00:24:00 +02:00
Michael Vetter
aedecee962 Get MAM since yesterday
Later we will have several options.
Getting everything since last timestamp (if none everything at all).
Getting everything since today + configure time (1 week).

Should also have a reload all command like conversations once you
cleared the history.

All MAM messages should be written into sql db.
And then probably displayed from there so that regular history works
too.
2020-04-12 00:06:36 +02:00
Michael Vetter
dd566d8d56 MAM: Correctly display incoming MAM chat message 2020-04-11 23:56:01 +02:00
Michael Vetter
180ec2b474 Add to_jid field to ProfMessage struct
Is usefult in many cases if we want cleaner code.
Hope this edit didn't break anything though ;-)
2020-04-11 17:11:53 +02:00
Michael Vetter
e23bc38083 Quick and dirty display of MAM messages 2020-04-11 16:05:14 +02:00
Michael Vetter
38273fef5c First test with receiving MAM 2020-04-11 16:05:14 +02:00
Michael Vetter
f3b8cc407d _handle_chat: return if no 'from'
Let's not crash :-)
2020-04-11 16:05:14 +02:00
Michael Vetter
e878b6d266 Don't crash if we get a message without from or type
MAM messages don't have a type nor a from.
If we detect a message without type let's log it and exit without
continuing to try to parse it.

Otherwise we go into _handle_chat() and crash on the no from.
2020-04-11 16:05:14 +02:00
Michael Vetter
fe9b520c42 First MAM test
Send a request (which we can't handle yet) :-)

Regards https://github.com/profanity-im/profanity/issues/660
2020-04-11 16:05:14 +02:00
Michael Vetter
c8233a4a58
Merge pull request #1310 from profanity-im/memleaks
Fix memory leaks in cons_roster_setting()
2020-04-10 20:25:50 +02:00
Dmitry Podgorny
70ad4d4a38 Fix memory leaks in cons_roster_setting() 2020-04-10 23:43:00 +03:00
Michael Vetter
b2eea969db Fix error in getting previous chatlog
Our search was too broad, and thus incorrect.

One of the various mistakes it can cause was
https://github.com/profanity-im/profanity/issues/1308

Fix https://github.com/profanity-im/profanity/issues/1308
2020-04-10 14:59:27 +02:00
Michael Vetter
e1b8fb24c3
Merge pull request #1309 from profanity-im/use-after-free
Fix use-after-free in stanza_create_caps_from_query_element()
2020-04-10 14:02:50 +02:00
Dmitry Podgorny
44377c6a5c Fix use-after-free in stanza_create_caps_from_query_element()
The function creates a form to find such strings as software, os, etc.
It remembers the strings allocated by form_create() and use them below
in caps_create(). The issue is that the form is destroyed before and as
result the strings are freed too.

As solution, allocate own copy of strings.
2020-04-09 15:22:11 +03:00
Michael Vetter
c90a5d174e
Merge pull request #1307 from profanity-im/memleaks
Fix memory leaks in _rosterwin_resources()
2020-04-09 11:54:02 +02:00
Dmitry Podgorny
aa4faf6075 Fix memory leaks in _rosterwin_resources() 2020-04-09 15:17:34 +03:00
Michael Vetter
401ebce84e Downgrade sqlite to 3.22.0
Last version in Ubuntu LTS (bionic 18.04).
I think we don't use later functionality. Let's see.

glib version fits.
2020-04-08 20:10:23 +02:00
Michael Vetter
f42f856d37 Retrieve message type from database
So we don't have to check for MUC another way.
2020-04-08 12:50:23 +02:00
Michael Vetter
444ce95aae Log after displaying the message
Otherwise we print the freshly received message to the window twice.
Once when receiving (and immediately printing), then logging it, and
then again when we print the last 10 log entries.

Fix https://github.com/profanity-im/profanity/issues/1305
2020-04-08 12:21:07 +02:00
Michael Vetter
2c46a56e3c travis: enable osx again
Seems like homebrew reverted their pkgconfig change for now.
So finding gio should work again.

Regards https://github.com/profanity-im/profanity/issues/1302
2020-04-07 12:06:32 +02:00
Michael Vetter
74392564bf Update dependencies in spec files 2020-04-07 11:39:17 +02:00
Michael Vetter
7419d29451 Update database stub 2020-04-07 11:31:17 +02:00
Michael Vetter
d3a387a0ec Downgrade dependencies
Use g_date_time_format() instead of g_date_time_format_iso8601() to only
rely on glib 2.56.0 which is the latest version in Debian Buster
(current stable).

We also only use basic sqlite functions so 3.27.0 should be fine there
(also the one in Debian buster).

Thanks to @DebXWoody.
2020-04-07 11:10:41 +02:00