1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-06-23 21:45:30 +00:00
Commit Graph

255 Commits

Author SHA1 Message Date
Michael Vetter
46fd7150e5 Add vim modeline 2019-11-13 12:11:05 +01:00
Michael Vetter
bc282ef569 Move id from DeliveryReceipt to ProfBuffEntry struct
XEP-0184: Message Delivery Receipts, *requires* the id attribute.
Generally this is not the case.
For this reason the id was only present in the DeliveryReceipt struct
since it was only used for XEP-0184.

For https://github.com/profanity-im/profanity/issues/660 XEP-0313 MAM
and https://github.com/profanity-im/profanity/issues/805 XEP-0308 Last Message Correction
we will also need the id.

So in preparation for further work let's move the id to the general
ProfBuffEntry.

We will need to adapt code so that we actually always write the ID if we
receive one.
2019-11-01 17:53:59 +01:00
Michael Vetter
4ecd4dea6a Replace sent_messages list with algo
For OMEMO we had a list with our sent messages.
It was used so that we don't decrypt our own messages in MUCs that come
in via reflection.

Recently for https://github.com/profanity-im/profanity/pull/1209 we
started to use origin-id and use an algorithm so we can detect our own
sent messages via checking origin-id.

Profanity uses the same id for the message ID and origin-id.

With 06f300a42c we added the
message_is_sent_by_us() function.

We implemented XEP-0359 this way to fix
https://github.com/profanity-im/profanity/issues/1201 so that we don't
log our own messages in MUCs twice.

We can now check whether the message was sent by us using this function
and can get rid of the list.

Probably we could also put many parts of the sv_ev_room_message()
function inside (else) part of `if (!(g_strcmp0(mynick,
message->jid->resourcepart) == 0 && message_is_sent_by_us(message))) {`.

Have to look more closely whether any of this needs to be run in case
the message actually comes from us.
2019-10-31 12:56:48 +01:00
Michael Vetter
d7c00360ea
Merge pull request #874 from spiridoncha/master
Change /clear behaviour. Closes issue #855.
2019-10-05 15:12:44 +02:00
Michael Vetter
aa0f497975 Allow colorization of history messages
History was always printed with `THEME_DEFAULT` we now use
`THEME_TEXT_HISTORY` which is accesible in theme files via
`main.text.history`.

Fix https://github.com/profanity-im/profanity/issues/1170
2019-09-10 11:22:30 +02:00
Michael Vetter
e540ccd50e Remove dead assignments 2019-07-22 14:27:14 +02:00
Paul Fariello
f831f65737 Rename prof_message_t into ProfMessage 2019-06-20 14:30:45 +02:00
Paul Fariello
9482ce6168 Set foreground color for untrusted messages 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
3bb3cc625d Use flags in xmmp/message.c for encryption and trust 2019-06-20 14:30:37 +02:00
Paul Fariello
e69f947547 Rework MUC reflected message filtering
Reflected messages can't be filtered by nick only otherwise you might
ignore messages comming from you on another devices.

Consequently we maintain a list of sent messages id in mucwin.
To be sure the id will be correctly reflected we use the origin-id
stanza.
2019-04-10 17:23:46 +02:00
Paul Fariello
4e1ffa6bdb Log and print outgoing encrypted message 2019-04-10 17:12:31 +02:00
Paul Fariello
0fb27dc496 Add OMEMO message encryption and decryption 2019-04-10 16:03:50 +02:00
Paul Fariello
2602cbf785 Move OMEMO initialization to profanity intialization
Also store identity keys into account
2019-04-10 15:37:22 +02:00
Michael Vetter
706af9a900 Update copyright to include 2019 2019-01-22 11:31:45 +01:00
Paul Fariello
db1ffae3bd Fix command exec error output 2018-09-05 14:17:26 +02:00
Paul Fariello
233e076be9 Add support for command config execution 2018-09-05 13:52:19 +02:00
Paul Fariello
b11d3a79df Add conf win callback 2018-09-05 13:51:00 +02:00
Paul Fariello
a952776b89 Rename mucconf wins into conf wins
Configuration windows are now being used by both muc and cmd.
2018-09-05 13:51:00 +02:00
Paul Fariello
40eee1caab Add command exec error handling 2018-09-05 13:51:00 +02:00
Paul Fariello
925cd488c1 Handle simple execution
Tested with ping from biboumi
2018-09-05 13:50:59 +02:00
Paul Fariello
c9f6a78f57 Add command subcommands: list and exec
Also handle list result
2018-09-05 13:49:40 +02:00
James Booth
59382984c0 Add preferences for tab display 2018-03-09 21:15:27 +00:00
James Booth
720dce866e Add prefs for empty tabs and tab names 2018-03-08 22:27:49 +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
9cfd17821c Allow room display properies to be set by plugins 2017-01-20 23:26:14 +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
b64646979e Remove unused function 2016-11-24 00:09:14 +00:00
Spiridonov Alexander
fd2346ccb4
Makes /clear behavior configurable. 2016-11-07 03:26:15 +03:00
Spiridonov Alexander
0d6aef68e7 Change /clear behaviour. Closes issue #855. 2016-10-22 00:08:55 +03:00
James Booth
651541d7ec Rename buffer functions 2016-10-16 19:40:43 +01:00
James Booth
7ad722ae28 Fix win_append buffer push 2016-10-15 22:17:16 +01:00
James Booth
bb6540f7d8 Add win highlight fuctions 2016-10-15 22:12:07 +01:00
James Booth
f3aebd547c Use varargs in win_println_indent 2016-10-15 21:05:26 +01:00
James Booth
c814cb44b8 Add win_print_history 2016-10-15 20:55:45 +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
ce5f07a012 Add win_append 2016-10-15 19:53:49 +01:00
James Booth
711c5b8e45 Add win_appendln 2016-10-15 19:19:44 +01:00
James Booth
8f1d3ab55c Add win_print 2016-10-15 18:29:02 +01:00
James Booth
3612270e90 Rename win_println -> win_println_indent 2016-10-15 17:23:02 +01:00
James Booth
5488fd6e72 Remove win_vprintln_ch 2016-10-15 17:17:17 +01:00
James Booth
e29e532d87 Remove whitespace 2016-10-15 16:42:23 +01:00
James Booth
6ed04d87b3 Rename win_get_string -> win_to_string 2016-10-15 16:41:37 +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