Fixed post buffer filtering
Oops
This commit is contained in:
+5
-1
@@ -153,7 +153,10 @@ impl Client {
|
|||||||
// Probably should check that we're still in a room maybe? Not sure how
|
// Probably should check that we're still in a room maybe? Not sure how
|
||||||
// kicks are going to work.
|
// kicks are going to work.
|
||||||
if let Some(relevance) = result.get_relevance() {
|
if let Some(relevance) = result.get_relevance() {
|
||||||
if self.subscriptions.contains(&relevance) {
|
if self.subscriptions.contains(&relevance) ||
|
||||||
|
(self.username.is_some() && relevance == Relevance::Post(
|
||||||
|
fedichat::User{name: self.username.clone().unwrap(),server: config.hostname.clone()}))
|
||||||
|
{
|
||||||
match self.message_ack.send(relevance.clone()).await {
|
match self.message_ack.send(relevance.clone()).await {
|
||||||
Ok(()) => (),
|
Ok(()) => (),
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
@@ -275,6 +278,7 @@ impl Client {
|
|||||||
if authed {
|
if authed {
|
||||||
debug!("Sending post");
|
debug!("Sending post");
|
||||||
tagged_message = Some(message.clone().tag(user.clone(),my_addr.clone()));
|
tagged_message = Some(message.clone().tag(user.clone(),my_addr.clone()));
|
||||||
|
debug!("{:?}",tagged_message);
|
||||||
// This is a safe unwrap because the tagged message is set to Some()
|
// This is a safe unwrap because the tagged message is set to Some()
|
||||||
// right above
|
// right above
|
||||||
self.message_send.send(tagged_message.clone().unwrap())
|
self.message_send.send(tagged_message.clone().unwrap())
|
||||||
|
|||||||
Reference in New Issue
Block a user