about summary refs log tree commit diff stats
path: root/src/ui/chatwin.c
diff options
context:
space:
mode:
authorDebXWoody <stefan@debxwoody.de>2020-07-05 10:47:09 +0200
committerMichael Vetter <jubalh@iodoru.org>2020-07-06 10:36:03 +0200
commit2a50bb6ad7d34848c9acb0d87469bb92e9e6e133 (patch)
treed0e5295699c2634c1bbe6c5ffaaec8e04216031d /src/ui/chatwin.c
parentd2c3aa566b81a03b112f0192cf10681c523bbfe9 (diff)
downloadprofani-tty-2a50bb6ad7d34848c9acb0d87469bb92e9e6e133.tar.gz
Plain chat messages not working
Plain chat messages not working for non-carbon + no OTR support.

On master we did some clean-up. The problem is at https://github.com/profanity-im/profanity/blob/0.9.patch/src/event/server_events.c#L625 (0.9.0). The implementation looks like:

- HAVE_LIBOTR is set - _sv_ev_incoming_otr
- HAVE_LIBOTR is not set - _sv_ev_incoming_plain

I think the `_sv_ev_incoming_otr` can handle otr and plain, because I didn't find a `_sv_ev_incoming_plain` if `HAVE_LIBOTR` is set.

On master for 0.10.0 the implementation is much better:
https://github.com/profanity-im/profanity/blob/master/src/event/server_events.c#L623

But, we just call `_sv_ev_incoming_otr` independent of `HAVE_LIBOTR`.
Unfortunately, `_sv_ev_incoming_otr` is doing nothing if `HAVE_LIBOTR` is not set:
https://github.com/profanity-im/profanity/blob/master/src/event/server_events.c#L538

I did some more clean-up at sv_ev_incoming_message and changed the implementation of `_sv_ev_incoming_otr`.

```
static void
_sv_ev_incoming_otr(ProfChatWin *chatwin, gboolean new_win, ProfMessage *message)
{
  // OTR or plain
        plain
}
```

The caller do not take care of `HAVE_LIBOTR`, call `_sv_ev_incoming_plain` if you are sure it's a plain message or call `_sv_ev_incoming_otr`. `_sv_ev_incoming_otr` can be used for otr / plain or for plain only.
Diffstat (limited to 'src/ui/chatwin.c')
0 files changed, 0 insertions, 0 deletions