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

99 Commits

Author SHA1 Message Date
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
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
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
5862e5b159 db: Fix memleaks 2020-04-06 16:09:38 +02:00
Michael Vetter
067bc690f2 Adapt win_print_history() to work with muc too 2020-04-06 15:33:01 +02:00
Michael Vetter
0942d98c61 Remove chat_log_get_previous()
We now dont get the log files from the text files via chat_log_get_previous() anymore.
We use the sql backend via log_database_get_previous_chat().

So far it just has the same behaviour like chat_log_get_previous(),
except that in _chatwin_history() we don't pass the sender to
win_print_history() which should be fixed in a commit soon.

And log_database_get_previous_chat() can later easily be expanded to fix
https://github.com/profanity-im/profanity/issues/205.
2020-04-06 14:42:52 +02:00
Michael Vetter
5d54bb228f Get regular chat history out of sql backend 2020-04-06 14:30:38 +02:00
Michael Vetter
1f8b1eb740 Allow utf8 symbols as omemo/pgp/otr indicator char
Fix https://github.com/profanity-im/profanity/issues/1264
2020-02-20 23:36:10 +01:00
Michael Vetter
ea5a947f52 Refactor win_print_history()
We never use the printf like behaviour anyways.
2020-02-17 12:05:58 +01:00
Michael Vetter
69d474b3a7 Refactor win_print_outgoing()
We never use the printf like behaviour anyways.
2020-02-17 11:48:50 +01:00
Michael Vetter
e27c414f1f xep-0308: enable for carbon copied messages
If we are connected with another client and send a message, then correct
it. We now display it correctly in Profanity.

Id wasn't saved for carbon copied messages too so far.
2020-02-14 10:17:07 +01:00
Michael Vetter
9b3593bdf9 xep-0308: enable correction in outgoing messages with delivery receipts 2020-02-14 10:17:07 +01:00
Michael Vetter
3e901aee99 Rename win_print_with_receipt() -> win_print_outgoing_with_receipt() 2020-02-14 10:17:07 +01:00
Michael Vetter
3a1be74e93 Add myself to copyright 2020-02-14 10:17:07 +01:00
Michael Vetter
b6b7dd5ad4 xep-0308: update the UI upon sending a corrected message
So far we don't do this for encrypted messages. Still needs to be done.
And MUC also needs to be done.
2020-02-11 15:26:58 +01:00
Michael Vetter
1118110071 xep-0308: Implement /correct to correct the last send message
So far the correction is sent. But the UI in Profanity itself is not
updated.

Also autocompletion for `/correct` with the last sent message is
missing.
2020-02-10 16:17:01 +01:00
Michael Vetter
14f25992c3 Initial work on last-read-position feature
Print dashes on the position we last left off in a chat window.
So far the number of dashes is hardcoded, and the feature only works in
chat windows.

Regards https://github.com/profanity-im/profanity/issues/1238
2019-12-13 12:05:24 +01:00
Michael Vetter
46fd7150e5 Add vim modeline 2019-11-13 12:11:05 +01:00
Michael Vetter
2292f15633 Make sure date vars are initialized 2019-10-21 16:19:35 +02:00
Michael Vetter
40d9dcae87 Properly display chatwin history
So far if one had enabled `/history` and did `/msg somenick` the history
was loaded from file and displayed like this:

```
04-04-17 15:23 - 3/4/2017:
01-01-00 10:30 - me: ....
01-01-00 10:31 - somebody: ....
01-01-00 10:32 - somebody: ....
```

So the first line contained the actual date. But the date used in each
line was always 01-01-2000. This date was for some reason hardcoded.

This commit now actually uses that date to build the proper GDateTime
instead of just printing it.

Fix https://github.com/profanity-im/profanity/issues/922
2019-10-21 15:26:40 +02:00
Paul Fariello
db8f32c049 Fix handling of encrypted carbons 2019-06-21 15:52:24 +02:00
Paul Fariello
f831f65737 Rename prof_message_t into ProfMessage 2019-06-20 14:30:45 +02:00
Paul Fariello
44d16e9141 Add prof_message_t to wrap all message attributes
Probably missing copy of body to plain in carbon and privmessage.
Only covers the incoming message path because goal is OMEMO decryption
of untrusted message.
Cover some of the log functions but not all.
2019-06-20 14:30:42 +02:00
Paul Fariello
5f015e32b2 Add OMEMO policy
There is 3 policy:

- manual: OMEMO session are only started manually
- automatic: OMEMO session are only started if they have been started
  manually before
- always: OMEMO session are always started unless they have been ended
  manually before

Closes #1040 and fixes #1052
2019-04-17 14:03:14 +02:00
Paul Fariello
2015ba201d Ensure encrypted carbon of own message are marked as encrypted 2019-04-10 17:23:45 +02:00
Paul Fariello
0fb27dc496 Add OMEMO message encryption and decryption 2019-04-10 16:03:50 +02:00
Michael Vetter
706af9a900 Update copyright to include 2019 2019-01-22 11:31:45 +01:00
James Booth
59382984c0 Add preferences for tab display 2018-03-09 21:15:27 +00:00
James Booth
119c5650cf Show name in statusbar tabs WIP 2018-03-08 20:01:36 +00:00
James Booth
250e972b7a Update copyright 2018-01-21 15:00:02 +00:00
James Booth
68a3daedb9 Update Copyright 2017-01-28 17:24:22 +00:00
James Booth
c8874cd2e0 Allow chat prefix char to be set by plugins 2017-01-20 21:03:55 +00:00
James Booth
1b25aa84cb Add titlebar encryption text to plugins api 2017-01-19 22:33:29 +00:00
James Booth
c814cb44b8 Add win_print_history 2016-10-15 20:55:45 +01:00
James Booth
f761d403b3 Use win_print_outgoing for carbons 2016-10-15 20:13:21 +01:00
James Booth
80309462ca Rename win_print_incoming_message -> win_print_incoming 2016-10-15 20:09:14 +01:00
James Booth
3b2ceee89b Add win_print_outgoing 2016-10-15 20:07:33 +01:00
James Booth
8f1d3ab55c Add win_print 2016-10-15 18:29:02 +01:00
James Booth
5488fd6e72 Remove win_vprintln_ch 2016-10-15 17:17:17 +01:00
James Booth
8cf9e0cccc Use win_printf_line where appropriate 2016-10-15 16:31:54 +01:00
James Booth
33b4b79f2e Add ch arg to win_printf_line 2016-10-15 00:04:57 +01:00
James Booth
2f888979c5 Use THEME_DEFAULT 2016-10-14 23:56:51 +01:00
James Booth
54cf1dbec4 Add win_printf_line 2016-10-14 23:38:39 +01:00
James Booth
24f0dc2734 Always use string format in win_printf 2016-10-12 00:40:41 +01:00
James Booth
7b31af3060 Remove args from win_print_with_receipt 2016-10-11 23:47:13 +01:00
James Booth
0890179fc4 Remove win_print, use win_printf instead 2016-10-11 23:38:59 +01:00
James Booth
0337c5b22c Rename win_vprint -> win_printf 2016-10-11 23:10:48 +01:00
James Booth
a978bb12bf Send receipt request only when receiver supports feature
issue #829
2016-08-18 22:53:23 +01:00